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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageFrame.h

Issue 2749703002: Refactor ImageFrame::setSizeAndColorSpace() (Closed)
Patch Set: Moving to another CR the separation of zeroing pixel data from setting alpha Created 3 years, 9 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/image-decoders/ImageFrame.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
index 5b5eb8aa93cbe7a65d594895364f740b71297ded..13bfb8210095b11b93eefcf3c0f14564680d20b9 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
@@ -118,11 +118,11 @@ class PLATFORM_EXPORT ImageFrame final {
memcpy(getAddr(startX, destY), startAddr, rowBytes);
}
- // Allocates space for the pixel data. Must be called before any pixels
- // are written. Must only be called once. The specified color space may
- // be nullptr if and only if color correct rendering is enabled. Returns
- // whether allocation succeeded.
- bool setSizeAndColorSpace(int newWidth, int newHeight, sk_sp<SkColorSpace>);
+ // Allocates space for the pixel data. Must be called before any pixels are
+ // written, and should only be called once. The specified color space may be
+ // null if and only if color correct rendering is enabled. Returns true if the
+ // allocation succeeded.
+ bool allocatePixelData(int newWidth, int newHeight, sk_sp<SkColorSpace>);
bool hasAlpha() const;
const IntRect& originalFrameRect() const { return m_originalFrameRect; }

Powered by Google App Engine
This is Rietveld 408576698