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

Unified Diff: third_party/WebKit/Source/core/html/ImageData.h

Issue 2630563003: Fix ImageBitmap constructor from ImageData to consider the color space tags (Closed)
Patch Set: Rebaseline Created 3 years, 11 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/html/ImageData.h
diff --git a/third_party/WebKit/Source/core/html/ImageData.h b/third_party/WebKit/Source/core/html/ImageData.h
index 286092d814f72f1f2ca689ec7ede782b27f07420..246a4cf85b0998060150d1977261f9bc0692c9b4 100644
--- a/third_party/WebKit/Source/core/html/ImageData.h
+++ b/third_party/WebKit/Source/core/html/ImageData.h
@@ -37,6 +37,7 @@
#include "platform/geometry/IntRect.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
+#include "third_party/skia/include/core/SkColorSpace.h"
#include "wtf/CheckedNumeric.h"
#include "wtf/Compiler.h"
#include "wtf/text/WTFString.h"
@@ -77,6 +78,9 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
public:
static ImageData* create(const IntSize&);
static ImageData* create(const IntSize&, DOMUint8ClampedArray*);
+ static ImageData* create(const IntSize&,
+ DOMUint8ClampedArray*,
+ const String&);
static ImageData* create(unsigned width, unsigned height, ExceptionState&);
static ImageData* create(DOMUint8ClampedArray*,
unsigned width,
@@ -104,6 +108,8 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
static ImageDataColorSpace getImageDataColorSpace(String);
static String getImageDataColorSpaceName(ImageDataColorSpace);
+ static sk_sp<SkColorSpace> imageDataColorSpaceToSkColorSpace(
+ ImageDataColorSpace);
IntSize size() const { return m_size; }
int width() const { return m_size.width(); }
@@ -113,6 +119,8 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
const DOMUint8ClampedArray* data() const { return m_data.get(); }
DOMUint8ClampedArray* data() { return m_data.get(); }
+ sk_sp<SkColorSpace> getSkColorSpace();
+
// ImageBitmapSource implementation
IntSize bitmapSourceSize() const override { return m_size; }
ScriptPromise createImageBitmap(ScriptState*,
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698