| 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 a15714650fb07ccc10b09ebf5c9351b9cd0c5d72..4a53fa18505522b7806574186e00c079a977aeaf 100644
|
| --- a/gpu/command_buffer/service/texture_manager.h
|
| +++ b/gpu/command_buffer/service/texture_manager.h
|
| @@ -13,6 +13,7 @@
|
| #include "gpu/command_buffer/service/feature_info.h"
|
| #include "gpu/command_buffer/service/gl_utils.h"
|
| #include "gpu/gpu_export.h"
|
| +#include "ui/gl/gl_image.h"
|
|
|
| namespace gpu {
|
| namespace gles2 {
|
| @@ -122,6 +123,10 @@ class GPU_EXPORT TextureManager {
|
| bool GetLevelType(
|
| GLint face, GLint level, GLenum* type, GLenum* internal_format) const;
|
|
|
| + // Get the image bound to a particular level. Returns NULL if level
|
| + // does not exist.
|
| + scoped_refptr<gfx::GLImage> GetLevelImage(GLint face, GLint level) const;
|
| +
|
| bool IsDeleted() const {
|
| return deleted_;
|
| }
|
| @@ -211,9 +216,12 @@ class GPU_EXPORT TextureManager {
|
| border(rhs.border),
|
| format(rhs.format),
|
| type(rhs.type),
|
| + image(rhs.image),
|
| estimated_size(rhs.estimated_size) {
|
| }
|
|
|
| + ~LevelInfo() {}
|
| +
|
| bool cleared;
|
| GLenum target;
|
| GLint level;
|
| @@ -224,6 +232,7 @@ class GPU_EXPORT TextureManager {
|
| GLint border;
|
| GLenum format;
|
| GLenum type;
|
| + scoped_refptr<gfx::GLImage> image;
|
| uint32 estimated_size;
|
| };
|
|
|
| @@ -289,6 +298,13 @@ class GPU_EXPORT TextureManager {
|
| // Update info about this texture.
|
| void Update(const FeatureInfo* feature_info);
|
|
|
| + // Set the image for a particular level.
|
| + void SetLevelImage(
|
| + const FeatureInfo* feature_info,
|
| + GLenum target,
|
| + GLint level,
|
| + scoped_refptr<gfx::GLImage> image);
|
| +
|
| // Info about each face and level of texture.
|
| std::vector<std::vector<LevelInfo> > level_infos_;
|
|
|
| @@ -513,6 +529,12 @@ class GPU_EXPORT TextureManager {
|
| return mem_represented_;
|
| }
|
|
|
| + void SetLevelImage(
|
| + TextureInfo* info,
|
| + GLenum target,
|
| + GLint level,
|
| + scoped_refptr<gfx::GLImage> image);
|
| +
|
| private:
|
| // Helper for Initialize().
|
| TextureInfo::Ref CreateDefaultAndBlackTextures(
|
|
|