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

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

Issue 2559013002: Add ColorBehavior to blink::Image draw methods (Closed)
Patch Set: Rebase 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
Index: third_party/WebKit/Source/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index dfbfe4ee08731923fe82023230cf74bfcdacf8f3..f6819a7082d0d98e16b4526b172c6cc3f3cf05bd 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -31,6 +31,7 @@
#include "platform/SharedBuffer.h"
#include "platform/geometry/IntRect.h"
#include "platform/graphics/Color.h"
+#include "platform/graphics/ColorBehavior.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageAnimationPolicy.h"
#include "platform/graphics/ImageObserver.h"
@@ -152,7 +153,7 @@ class PLATFORM_EXPORT Image : public ThreadSafeRefCounted<Image> {
enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
- virtual sk_sp<SkImage> imageForCurrentFrame() = 0;
+ virtual sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) = 0;
virtual PassRefPtr<Image> imageForDefaultFrame();
virtual void drawPattern(GraphicsContext&,
@@ -173,9 +174,12 @@ class PLATFORM_EXPORT Image : public ThreadSafeRefCounted<Image> {
const FloatRect& dstRect,
const FloatRect& srcRect,
RespectImageOrientationEnum,
- ImageClampingMode) = 0;
+ ImageClampingMode,
+ const ColorBehavior&) = 0;
- virtual bool applyShader(SkPaint&, const SkMatrix& localMatrix);
+ virtual bool applyShader(SkPaint&,
+ const SkMatrix& localMatrix,
+ const ColorBehavior&);
// Compute the tile which contains a given point (assuming a repeating tile
// grid). The point and returned value are in destination grid space.
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698