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

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

Issue 2125023002: Reland "webgl: use immutable texture for the default FBO." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add GL_BGRA8_EXT Created 4 years, 5 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: 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 e0a19da5761fbfe3445f69b93b6f22155621eb72..7ee4480ecd9c588b7ea96d345d49ab1661b94494 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -253,6 +253,7 @@ private:
DISALLOW_NEW();
GLuint textureId = 0;
GLuint imageId = 0;
+ bool immutable = false;
// A GpuMemoryBuffer is a concept that the compositor understands. and
// is able to operate on. The id is scoped to renderer process.
@@ -321,9 +322,10 @@ 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);
+ // Create a storage texture if possible.
+ // Return true if a storage texture is created.
+ // Return false if a regular texture is created.
+ bool createStorageTextureIfPossible(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type);
// Allocate buffer storage to be sent to compositor using either texImage2D or CHROMIUM_image based on available support.
void deleteChromiumImageForTexture(TextureInfo*);
@@ -376,6 +378,7 @@ private:
const bool m_wantAlphaChannel;
const bool m_premultipliedAlpha;
bool m_hasImplicitStencilBuffer = false;
+ bool m_storageTextureSupported = false;
struct FrontBufferInfo {
TextureInfo texInfo;
WebExternalTextureMailbox mailbox;

Powered by Google App Engine
This is Rietveld 408576698