<commit_before>//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// RenderTarget.h: Defines an abstract wrapper class to manage IDirect3DSurface9
// and ID3D11View objects belonging to renderbuffers.

#ifndef LIBGLESV2_RENDERER_RENDERTARGET_H_
#define LIBGLESV2_RENDERER_RENDERTARGET_H_

#include "common/angleutils.h"

namespace rx
{
class RenderTarget
{
  public:
    RenderTarget()
    {
        mWidth = 0;
        mHeight = 0;
        mDepth = 0;
        mInternalFormat = GL_NONE;
        mActualFormat = GL_NONE;
        mSamples = 0;
    }

    virtual ~RenderTarget() {};

    GLsizei getWidth() { return mWidth; }
    GLsizei getHeight() { return mHeight; }
    GLsizei getDepth() { return mDepth; }
    GLenum getInternalFormat() { return mInternalFormat; }
    GLenum getActualFormat() { return mActualFormat; }
    GLsizei getSamples() { return mSamples; }

    virtual void invalidate(GLint x, GLint y, GLsizei width, GLsizei height) = 0;

    struct Desc {
        GLsizei width;
        GLsizei height;
        GLsizei depth;
        GLenum  format;
    };

  protected:
    GLsizei mWidth;
    GLsizei mHeight;
    GLsizei mDepth;
    GLenum mInternalFormat;
    GLenum mActualFormat;
    GLsizei mSamples;

  private:
    DISALLOW_COPY_AND_ASSIGN(RenderTarget);
};

}

#endif // LIBGLESV2_RENDERTARGET_H_
<commit_msg>Add a helper method to gl::RenderTarget to return the extents of the texture (width/height/depth).<commit_after>//
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// RenderTarget.h: Defines an abstract wrapper class to manage IDirect3DSurface9
// and ID3D11View objects belonging to renderbuffers.

#ifndef LIBGLESV2_RENDERER_RENDERTARGET_H_
#define LIBGLESV2_RENDERER_RENDERTARGET_H_

#include "common/angleutils.h"
#include "libGLESv2/angletypes.h"

namespace rx
{
class RenderTarget
{
  public:
    RenderTarget()
    {
        mWidth = 0;
        mHeight = 0;
        mDepth = 0;
        mInternalFormat = GL_NONE;
        mActualFormat = GL_NONE;
        mSamples = 0;
    }

    virtual ~RenderTarget() {};

    GLsizei getWidth() const { return mWidth; }
    GLsizei getHeight() const { return mHeight; }
    GLsizei getDepth() const { return mDepth; }
    GLenum getInternalFormat() const { return mInternalFormat; }
    GLenum getActualFormat() const { return mActualFormat; }
    GLsizei getSamples() const { return mSamples; }
    gl::Extents getExtents() const { return gl::Extents(mWidth, mHeight, mDepth); }

    virtual void invalidate(GLint x, GLint y, GLsizei width, GLsizei height) = 0;

    struct Desc {
        GLsizei width;
        GLsizei height;
        GLsizei depth;
        GLenum  format;
    };

  protected:
    GLsizei mWidth;
    GLsizei mHeight;
    GLsizei mDepth;
    GLenum mInternalFormat;
    GLenum mActualFormat;
    GLsizei mSamples;

  private:
    DISALLOW_COPY_AND_ASSIGN(RenderTarget);
};

}

#endif // LIBGLESV2_RENDERTARGET_H_

{'fraction_non_alphanumeric': 0.08293913591926837, 'fraction_numerical': 0.011037527593818985, 'mean_word_length': 3.0562659846547313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2962083', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1036, 'n_words': 294}