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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h

Issue 2825183002: Plumb CanvasColorParams to canvas image classes (Closed)
Patch Set: Require both runtime flags Created 3 years, 8 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/graphics/ImageBufferSurface.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h
index 9ac1b57d4c86335c6e1ce6e8be13abac2cf8e7d6..bc4af9dd749b095a65c5f4d22f07043030d70317 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h
@@ -33,6 +33,7 @@
#include "platform/PlatformExport.h"
#include "platform/geometry/IntSize.h"
+#include "platform/graphics/CanvasColorParams.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/paint/PaintCanvas.h"
#include "platform/graphics/paint/PaintFlags.h"
@@ -43,7 +44,6 @@
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkRefCnt.h"
-class SkColorSpace;
class SkImage;
struct SkImageInfo;
@@ -104,22 +104,17 @@ class PLATFORM_EXPORT ImageBufferSurface {
OpacityMode GetOpacityMode() const { return opacity_mode_; }
const IntSize& size() const { return size_; }
- const sk_sp<SkColorSpace> ColorSpace() const { return color_space_; }
- SkColorType ColorType() const { return color_type_; }
+ const CanvasColorParams& color_params() const { return color_params_; }
void NotifyIsValidChanged(bool is_valid) const;
protected:
- ImageBufferSurface(const IntSize&,
- OpacityMode,
- sk_sp<SkColorSpace>,
- SkColorType);
+ ImageBufferSurface(const IntSize&, OpacityMode, const CanvasColorParams&);
void Clear();
private:
OpacityMode opacity_mode_;
IntSize size_;
- sk_sp<SkColorSpace> color_space_;
- SkColorType color_type_;
+ CanvasColorParams color_params_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698