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

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

Issue 14828011: Mark zero dimension textures as unrenderable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 7293f272e14209a21cd68fdb8a6f3d681e2d027a..2dd6af2dfa8ce3eeceede19f2dbd00eaeb5f6e37 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -139,11 +139,7 @@ class GPU_EXPORT Texture : public base::RefCounted<Texture> {
--framebuffer_attachment_count_;
}
- void SetStreamTexture(bool stream_texture) {
- stream_texture_ = stream_texture;
- }
-
- bool IsStreamTexture() {
+ bool IsStreamTexture() const {
return stream_texture_;
}
@@ -162,7 +158,7 @@ class GPU_EXPORT Texture : public base::RefCounted<Texture> {
immutable_ = immutable;
}
- bool IsImmutable() {
+ bool IsImmutable() const {
return immutable_;
}
@@ -170,7 +166,7 @@ class GPU_EXPORT Texture : public base::RefCounted<Texture> {
bool IsLevelCleared(GLenum target, GLint level) const;
// Whether the texture has been defined
- bool IsDefined() {
+ bool IsDefined() const {
return estimated_size() > 0;
}
@@ -232,6 +228,10 @@ class GPU_EXPORT Texture : public base::RefCounted<Texture> {
return npot_;
}
+ void SetStreamTexture(bool stream_texture) {
+ stream_texture_ = stream_texture;
+ }
+
// Marks a particular level as cleared or uncleared.
void SetLevelCleared(GLenum target, GLint level, bool cleared);
@@ -275,7 +275,8 @@ class GPU_EXPORT Texture : public base::RefCounted<Texture> {
// target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP or
// GL_TEXTURE_EXTERNAL_OES or GL_TEXTURE_RECTANGLE_ARB
// max_levels: The maximum levels this type of target can have.
- void SetTarget(GLenum target, GLint max_levels);
+ void SetTarget(
+ const FeatureInfo* feature_info, GLenum target, GLint max_levels);
// Update info about this texture.
void Update(const FeatureInfo* feature_info);
@@ -436,6 +437,9 @@ class GPU_EXPORT TextureManager {
Texture* texture,
GLenum target);
+ // Marks a texture as a stream texture.
+ void SetStreamTexture(Texture* texture, bool stream_texture);
+
// Set the info for a particular level in a TexureInfo.
void SetLevelInfo(
Texture* texture,

Powered by Google App Engine
This is Rietveld 408576698