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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h

Issue 1449043005: webgl: use immutable texture for the default FBO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix layout tests failure Created 5 years, 1 month 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: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
index 0b4a0e37b863b4acdbcd5b5c6dc8363b581cac4d..b467867abb90574bb480bcd106c080eb06454619 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -69,10 +69,12 @@ class PLATFORM_EXPORT DrawingBuffer : public RefCounted<DrawingBuffer>, public W
struct TextureInfo {
Platform3DObject textureId;
WGC3Duint imageId;
+ bool immutable;
TextureInfo()
: textureId(0)
, imageId(0)
+ , immutable(false)
{
}
};
@@ -230,9 +232,6 @@ private:
// Helper function to flip a bitmap vertically.
void flipVertically(uint8_t* data, int width, int height);
- // Helper to texImage2D with pixel==0 case: pixels are initialized to 0.
- // By default, alignment is 4, the OpenGL default setting.
- void texImage2DResourceSafe(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLint alignment = 4);
// Allocate buffer storage to be sent to compositor using either texImage2D or CHROMIUM_image based on available support.
void allocateTextureMemory(TextureInfo*, const IntSize&);
void deleteChromiumImageForTexture(TextureInfo*);
@@ -251,6 +250,7 @@ private:
bool m_multisampleExtensionSupported;
bool m_packedDepthStencilExtensionSupported;
bool m_discardFramebufferSupported;
+ bool m_storageTextureSupported;
Platform3DObject m_fbo;
// DrawingBuffer's output is double-buffered. m_colorBuffer is the back buffer.
TextureInfo m_colorBuffer;

Powered by Google App Engine
This is Rietveld 408576698