| Index: gpu/command_buffer/service/texture_manager.h
|
| diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
|
| index 11c8b6305050b6bff3fb6abacfa2c52b5bddf6e5..394feefab4501613a9d841a51b4bd36c222eba5b 100644
|
| --- a/gpu/command_buffer/service/texture_manager.h
|
| +++ b/gpu/command_buffer/service/texture_manager.h
|
| @@ -51,10 +51,21 @@ class GPU_EXPORT TextureBase {
|
| // The service side OpenGL id of the texture.
|
| GLuint service_id() const { return service_id_; }
|
|
|
| + // Returns the target this texure was first bound to or 0 if it has not
|
| + // been bound. Once a texture is bound to a specific target it can never be
|
| + // bound to a different target.
|
| + GLenum target() const { return target_; }
|
| +
|
| protected:
|
| // The id of the texture.
|
| GLuint service_id_;
|
|
|
| + // The target. 0 if unset, otherwise GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP.
|
| + // Or GL_TEXTURE_2D_ARRAY or GL_TEXTURE_3D (for GLES3).
|
| + GLenum target_;
|
| +
|
| + void SetTarget(GLenum target);
|
| +
|
| void DeleteFromMailboxManager();
|
|
|
| private:
|
| @@ -71,7 +82,7 @@ class GPU_EXPORT TextureBase {
|
| class TexturePassthrough final : public TextureBase,
|
| public base::RefCounted<TexturePassthrough> {
|
| public:
|
| - explicit TexturePassthrough(GLuint service_id);
|
| + TexturePassthrough(GLuint service_id, GLenum target);
|
|
|
| // Notify the texture that the context is lost and it shouldn't delete the
|
| // native GL texture in the destructor
|
| @@ -195,13 +206,6 @@ class GPU_EXPORT Texture final : public TextureBase {
|
| owned_service_id_ = service_id;
|
| }
|
|
|
| - // Returns the target this texure was first bound to or 0 if it has not
|
| - // been bound. Once a texture is bound to a specific target it can never be
|
| - // bound to a different target.
|
| - GLenum target() const {
|
| - return target_;
|
| - }
|
| -
|
| bool SafeToRenderFrom() const {
|
| return cleared_;
|
| }
|
| @@ -593,10 +597,6 @@ class GPU_EXPORT Texture final : public TextureBase {
|
| int num_uncleared_mips_;
|
| int num_npot_faces_;
|
|
|
| - // The target. 0 if unset, otherwise GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP.
|
| - // Or GL_TEXTURE_2D_ARRAY or GL_TEXTURE_3D (for GLES3).
|
| - GLenum target_;
|
| -
|
| // Texture parameters.
|
| SamplerState sampler_state_;
|
| GLenum usage_;
|
|
|