Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: gpu/command_buffer/service/texture_manager.h

Issue 10543125: gpu: Add support for GLX_EXT_texture_from_pixmap extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add kGLImplementationMockGL case to gl_image_android.cc. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/image_manager.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ef9e020a601a8732f18876aa405dbefd14aae75e 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.
+ 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,
+ 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,
+ gfx::GLImage* image);
+
private:
// Helper for Initialize().
TextureInfo::Ref CreateDefaultAndBlackTextures(
« no previous file with comments | « gpu/command_buffer/service/image_manager.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698