| 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 26c0c0cb80f4295913f7f6de7649ec8c6d690bb3..1ffb69e54d65741f609fd4246a46e4eace81db7c 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 {
|
| @@ -124,6 +125,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_;
|
| }
|
| @@ -189,6 +194,7 @@ class GPU_EXPORT TextureManager {
|
| struct LevelInfo {
|
| LevelInfo();
|
| LevelInfo(const LevelInfo& rhs);
|
| + ~LevelInfo();
|
|
|
| bool cleared;
|
| GLenum target;
|
| @@ -200,6 +206,7 @@ class GPU_EXPORT TextureManager {
|
| GLint border;
|
| GLenum format;
|
| GLenum type;
|
| + scoped_refptr<gfx::GLImage> image;
|
| uint32 estimated_size;
|
| };
|
|
|
| @@ -265,6 +272,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_;
|
|
|
| @@ -490,6 +504,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(
|
|
|