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

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

Issue 274833002: Enable WebGL rendering into ImageCHROMIUM, backed by a scanout buffer to enable overlay suppor… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/platform/graphics/gpu/DrawingBuffer.h
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.h b/Source/platform/graphics/gpu/DrawingBuffer.h
index b8a51abb68908f13cc491b4e8e54be221b18badb..f50702338777808d19e18aaa7c25d7c357750e6f 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.h
+++ b/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -160,7 +160,7 @@ protected: // For unittests
private:
void mailboxReleasedWhileDestructionInProgress(const blink::WebExternalTextureMailbox&);
- unsigned createColorTexture(const IntSize& size = IntSize());
+ unsigned createColorTexture();
// Create the depth/stencil and multisample buffers, if needed.
void createSecondaryBuffers();
bool resizeFramebuffer(const IntSize&);
@@ -204,6 +204,9 @@ private:
// 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(Platform3DObject textureId, const IntSize&);
+ void deleteChromiumImageForTexture(Platform3DObject textureId);
PreserveDrawingBuffer m_preserveDrawingBuffer;
bool m_scissorEnabled;
@@ -262,6 +265,9 @@ private:
Vector<RefPtr<MailboxInfo> > m_textureMailboxes;
// Mailboxes that were released by the compositor can be used again by this DrawingBuffer.
Deque<blink::WebExternalTextureMailbox> m_recycledMailboxQueue;
+ // If we used CHROMIUM_image as the backing storage for our buffers,
+ // we need to know the mapping from texture id to image.
+ HashMap<Platform3DObject, blink::WGC3Duint> m_textureToImageChromiumMap;
RefPtr<ContextEvictionManager> m_contextEvictionManager;
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698