OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BaseRenderingContext2D_h | 5 #ifndef BaseRenderingContext2D_h |
6 #define BaseRenderingContext2D_h | 6 #define BaseRenderingContext2D_h |
7 | 7 |
8 #include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrSVGImageElementOr
HTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h" | 8 #include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrSVGImageElementOr
HTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h" |
9 #include "bindings/modules/v8/StringOrCanvasGradientOrCanvasPattern.h" | 9 #include "bindings/modules/v8/StringOrCanvasGradientOrCanvasPattern.h" |
10 #include "core/html/ImageData.h" | 10 #include "core/html/ImageData.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 virtual bool StateHasFilter() = 0; | 241 virtual bool StateHasFilter() = 0; |
242 virtual sk_sp<SkImageFilter> StateGetFilter() = 0; | 242 virtual sk_sp<SkImageFilter> StateGetFilter() = 0; |
243 virtual void SnapshotStateForFilter() = 0; | 243 virtual void SnapshotStateForFilter() = 0; |
244 | 244 |
245 virtual void ValidateStateStack() const = 0; | 245 virtual void ValidateStateStack() const = 0; |
246 | 246 |
247 virtual bool HasAlpha() const = 0; | 247 virtual bool HasAlpha() const = 0; |
248 | 248 |
249 virtual bool isContextLost() const = 0; | 249 virtual bool isContextLost() const = 0; |
250 | 250 |
251 virtual ColorBehavior DrawImageColorBehavior() const = 0; | |
252 | |
253 virtual void WillDrawImage(CanvasImageSource*) const {} | 251 virtual void WillDrawImage(CanvasImageSource*) const {} |
254 | 252 |
255 virtual CanvasColorSpace ColorSpace() const { | 253 virtual CanvasColorSpace ColorSpace() const { |
256 return kLegacyCanvasColorSpace; | 254 return kLegacyCanvasColorSpace; |
257 }; | 255 }; |
258 virtual String ColorSpaceAsString() const { | 256 virtual String ColorSpaceAsString() const { |
259 return kLegacyCanvasColorSpaceName; | 257 return kLegacyCanvasColorSpaceName; |
260 } | 258 } |
261 virtual CanvasPixelFormat PixelFormat() const { | 259 virtual CanvasPixelFormat PixelFormat() const { |
262 return kRGBA8CanvasPixelFormat; | 260 return kRGBA8CanvasPixelFormat; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 foreground_flags.setBlendMode(SkBlendMode::kSrcOver); | 482 foreground_flags.setBlendMode(SkBlendMode::kSrcOver); |
485 c->setMatrix(ctm); | 483 c->setMatrix(ctm); |
486 draw_func(c, &foreground_flags); | 484 draw_func(c, &foreground_flags); |
487 c->restore(); | 485 c->restore(); |
488 c->setMatrix(ctm); | 486 c->setMatrix(ctm); |
489 } | 487 } |
490 | 488 |
491 } // namespace blink | 489 } // namespace blink |
492 | 490 |
493 #endif // BaseRenderingContext2D_h | 491 #endif // BaseRenderingContext2D_h |
OLD | NEW |