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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h

Issue 1752083003: mac: Use IOSurfaces in Canvas2DLayerBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp36_canvas2d_refactor
Patch Set: Compile error. 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: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
index d55007aa9dd728032874a5a899a88edda01c19b8..f3d56a8dad469c999b944620116a70d26dea520c 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -132,6 +132,11 @@ private:
RefPtr<SkImage> m_image;
RefPtr<Canvas2DLayerBridge> m_parentLayerBridge;
+ // If this mailbox wraps an IOSurface-backed texture, the ids of the
+ // CHROMIUM image and the texture.
+ GLuint m_CHROMIUMImageId = 0;
Justin Novosad 2016/03/02 16:33:45 Can we use "#if OS(MACOSX)" for this (and the code
+ GLuint m_textureId = 0;
+
MailboxInfo(const MailboxInfo&);
MailboxInfo() {}
};
@@ -154,6 +159,18 @@ private:
// Returns the GL filter associated with |m_filterQuality|.
GLenum getGLFilter();
+ // Creates an IOSurface-backed texture. Copies |image| into the texture.
+ // Prepares a mailbox from the texture. Stores all information in a newly
+ // created MailboxInfo, which resides in |m_mailboxes|. Returns whether the
+ // mailbox was successfully prepared. |mailbox| is an out parameter only
+ // populated on success.
+ bool prepareIOSurfaceMailboxFromImage(RefPtr<SkImage>&, WebExternalTextureMailbox*);
+
+ // Creates an IOSurface-backed texture. Returns whether the texture ewas
+ // successfully created. |texture| and |imageId| are out parameters. The
+ // caller takes ownership of both the texture and the image.
+ bool createIOSurfaceBackedTexture(GLuint* texture, GLuint* imageId);
+
// Prepends a new MailboxInfo object to |m_mailboxes|, and returns a
// reference. The reference is no longer valid after |m_mailboxes| is
// mutated.

Powered by Google App Engine
This is Rietveld 408576698