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

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.h

Issue 2348263005: Eliminate one copy from ImageBitmap deserialization. (Closed)
Patch Set: 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/core/frame/ImageBitmap.h
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h
index 312a62d266634767796733741f49430ce3bb9cb1..d61c4183fe9d4810e69174f60f551b1c57c50da8 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -48,7 +48,7 @@ public:
// This function is called by structured-cloning an ImageBitmap.
// isImageBitmapPremultiplied indicates whether the original ImageBitmap is premultiplied or not.
// isImageBitmapOriginClean indicates whether the original ImageBitmap is origin clean or not.
- static ImageBitmap* create(std::unique_ptr<uint8_t[]> data, uint32_t width, uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClean);
+ static ImageBitmap* create(const void* pixelData, uint32_t width, uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClean);
static sk_sp<SkImage> getSkImageFromDecoder(std::unique_ptr<ImageDecoder>);
static bool isResizeOptionValid(const ImageBitmapOptions&, ExceptionState&);
static bool isSourceSizeValid(int sourceWidth, int sourceHeight, ExceptionState&);
@@ -95,7 +95,7 @@ private:
ImageBitmap(ImageBitmap*, Optional<IntRect>, const ImageBitmapOptions&);
ImageBitmap(PassRefPtr<StaticBitmapImage>);
ImageBitmap(PassRefPtr<StaticBitmapImage>, Optional<IntRect>, const ImageBitmapOptions&);
- ImageBitmap(std::unique_ptr<uint8_t[]> data, uint32_t width, uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClean);
+ ImageBitmap(const void* pixelData, uint32_t width, uint32_t height, bool isImageBitmapPremultiplied, bool isImageBitmapOriginClean);
RefPtr<StaticBitmapImage> m_image;
bool m_isNeutered = false;

Powered by Google App Engine
This is Rietveld 408576698