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

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

Issue 2522693002: Color correct ImageBitmap(HTMLImageElement*) constructor (Closed)
Patch Set: Addressing crash on memory sanitizer trybot Created 4 years 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9cc2b77e640c4dd88e82dfdbdc0323ad20385e8a..018ac226f9075d838b1fc8f3f8030fae45962045 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -34,6 +34,10 @@ enum DataColorFormat {
RGBAColorType,
N32ColorType,
};
+enum ColorSpaceInfoUpdate {
+ UpdateColorSpaceInformation,
+ DontUpdateColorSpaceInformation,
+};
class CORE_EXPORT ImageBitmap final
: public GarbageCollectedFinalized<ImageBitmap>,
@@ -74,7 +78,11 @@ class CORE_EXPORT ImageBitmap final
uint32_t height,
bool isImageBitmapPremultiplied,
bool isImageBitmapOriginClean);
- static sk_sp<SkImage> getSkImageFromDecoder(std::unique_ptr<ImageDecoder>);
+ static sk_sp<SkImage> getSkImageFromDecoder(
+ std::unique_ptr<ImageDecoder>,
+ SkColorType* decodedColorType = nullptr,
+ sk_sp<SkColorSpace>* decodedColorSpace = nullptr,
+ ColorSpaceInfoUpdate = DontUpdateColorSpaceInformation);
static bool isResizeOptionValid(const ImageBitmapOptions&, ExceptionState&);
static bool isSourceSizeValid(int sourceWidth,
int sourceHeight,
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698