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

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

Issue 2364633003: color: Set GpuMemoryBuffer color spaces for Canvas (Closed)
Patch Set: Fix constexpr Created 4 years, 3 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 fc94bdce70c3594061c505ef9cf0e4ef2eddb425..333de5cb33c495349ee826ecc11ce5251119acdf 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -159,19 +159,7 @@ public:
private:
#if USE_IOSURFACE_FOR_2D_CANVAS
// All information associated with a CHROMIUM image.
- struct ImageInfo {
- ImageInfo() {}
- ImageInfo(GLuint imageId, GLuint textureId);
-
- // Whether this structure holds references to a CHROMIUM image.
- bool empty();
-
- // The id of the CHROMIUM image.
- GLuint m_imageId = 0;
-
- // The id of the texture bound to the CHROMIUM image.
- GLuint m_textureId = 0;
- };
+ struct ImageInfo;
#endif // USE_IOSURFACE_FOR_2D_CANVAS
struct MailboxInfo {
@@ -183,7 +171,7 @@ private:
#if USE_IOSURFACE_FOR_2D_CANVAS
// If this mailbox wraps an IOSurface-backed texture, the ids of the
// CHROMIUM image and the texture.
- ImageInfo m_imageInfo;
+ RefPtr<ImageInfo> m_imageInfo;
#endif // USE_IOSURFACE_FOR_2D_CANVAS
MailboxInfo(const MailboxInfo&);
@@ -217,10 +205,10 @@ private:
// Creates an IOSurface-backed texture. Returns an ImageInfo, which is empty
// on failure. The caller takes ownership of both the texture and the image.
- ImageInfo createIOSurfaceBackedTexture();
+ RefPtr<ImageInfo> createIOSurfaceBackedTexture();
// Releases all resources associated with a CHROMIUM image.
- void deleteCHROMIUMImage(ImageInfo);
+ void deleteCHROMIUMImage(RefPtr<ImageInfo>);
// Releases all resources in the CHROMIUM image cache.
void clearCHROMIUMImageCache();
@@ -284,7 +272,7 @@ private:
// Each element in this vector represents an IOSurface backed texture that
// is ready to be reused.
// Elements in this vector can safely be purged in low memory conditions.
- Vector<ImageInfo> m_imageInfoCache;
+ Vector<RefPtr<ImageInfo>> m_imageInfoCache;
#endif // USE_IOSURFACE_FOR_2D_CANVAS
};

Powered by Google App Engine
This is Rietveld 408576698