Chromium Code Reviews| 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; |
|
ccameron
2016/09/27 19:53:14
This could reasonably be expected to be a std::uni
|
| #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 |
| }; |