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

Unified Diff: third_party/WebKit/public/platform/WebExternalTextureMailbox.h

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build + feedback Created 4 years, 4 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/public/platform/WebExternalTextureMailbox.h
diff --git a/third_party/WebKit/public/platform/WebExternalTextureMailbox.h b/third_party/WebKit/public/platform/WebExternalTextureMailbox.h
index 0bb41cfd87bcb188c2c6d0c8caafad4a93ae54dc..efb251c446dbeb33782e68189c2cdd867a78af52 100644
--- a/third_party/WebKit/public/platform/WebExternalTextureMailbox.h
+++ b/third_party/WebKit/public/platform/WebExternalTextureMailbox.h
@@ -33,6 +33,8 @@
#include "WebSize.h"
+class SkColorSpace;
+
namespace blink {
struct WebExternalTextureMailbox {
@@ -44,11 +46,21 @@ struct WebExternalTextureMailbox {
unsigned textureTarget = 0;
WebSize textureSize;
+ // Note: This should really not be a pointer, or be an sk_sp, but
+ // SkColorSpace is non-copyable and passing an sk_sp over
+ // the blink API boundary causes heap corruption, so we are using
+ // a raw pointer. This is safe because WebExternalTextureMailbox
+ // objects are ephemeral and never outlive the SkColorSpace object
+ // in the current implementation.
+ const SkColorSpace* colorSpace;
+
WebExternalTextureMailbox()
{
memset(name, 0, sizeof(name));
memset(syncToken, 0, sizeof(syncToken));
}
+
+ ~WebExternalTextureMailbox() { }
};
inline bool nameEquals(const WebExternalTextureMailbox& a, const WebExternalTextureMailbox& b)

Powered by Google App Engine
This is Rietveld 408576698