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

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

Issue 1559203003: Add GLStreamTextureImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/GL_EXPORT/GPU_EXPORT for windows Created 4 years, 10 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
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 c57abecf0d61b831a113c7304694d185d1da6be2..50421ed4f56ffd17e1ac975efa8eb5814dfc555e 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -28,6 +28,7 @@ namespace gpu {
namespace gles2 {
class GLES2Decoder;
+class GLStreamTextureImage;
struct ContextState;
struct DecoderFramebufferState;
class Display;
@@ -167,6 +168,14 @@ class GPU_EXPORT Texture {
gl::GLImage* image,
ImageState state);
+ // Set the GLStreamTextureImage for a particular level. This is identical
+ // to SetLevelImage, but it also permits GetLevelStreamTextureImage to return
+ // the image.
+ void SetLevelStreamTextureImage(GLenum target,
+ GLint level,
+ GLStreamTextureImage* image,
+ ImageState state);
+
// Get the image associated with a particular level. Returns NULL if level
// does not exist.
gl::GLImage* GetLevelImage(GLint target,
@@ -174,6 +183,11 @@ class GPU_EXPORT Texture {
ImageState* state) const;
gl::GLImage* GetLevelImage(GLint target, GLint level) const;
+ // Like GetLevelImage, but will return NULL if the image wasn't set via
+ // a call to SetLevelStreamTextureImage.
+ GLStreamTextureImage* GetLevelStreamTextureImage(GLint target,
+ GLint level) const;
+
bool HasImages() const {
return has_images_;
}
@@ -278,6 +292,7 @@ class GPU_EXPORT Texture {
GLenum format;
GLenum type;
scoped_refptr<gl::GLImage> image;
+ scoped_refptr<GLStreamTextureImage> stream_texture_image;
ImageState image_state;
uint32_t estimated_size;
bool internal_workaround;
@@ -293,6 +308,17 @@ class GPU_EXPORT Texture {
std::vector<LevelInfo> level_infos;
};
+ // Helper for SetLevel*Image. |stream_texture_image| may be null.
+ void SetLevelImageInternal(GLenum target,
+ GLint level,
+ gl::GLImage* image,
+ GLStreamTextureImage* stream_texture_image,
+ ImageState state);
+
+ // Helper for GetLevel*Image. Returns the LevelInfo for |target| and |level|
+ // if it's set, else NULL.
+ const LevelInfo* GetLevelInfo(GLint target, GLint level) const;
+
// Set the info for a particular level.
void SetLevelInfo(GLenum target,
GLint level,
@@ -853,6 +879,12 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider {
gl::GLImage* image,
Texture::ImageState state);
+ void SetLevelStreamTextureImage(TextureRef* ref,
+ GLenum target,
+ GLint level,
+ GLStreamTextureImage* image,
+ Texture::ImageState state);
+
size_t GetSignatureSize() const;
void AddToSignature(
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698