Chromium Code Reviews| Index: Source/platform/graphics/GraphicsContext.h |
| diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h |
| index 1593a96cd6c836e939e9f9f93bad9bbc09b4f15e..22738215bab0f790ad6de804ac39e2ccca1646b8 100644 |
| --- a/Source/platform/graphics/GraphicsContext.h |
| +++ b/Source/platform/graphics/GraphicsContext.h |
| @@ -95,6 +95,14 @@ public: |
| ASSERT(!paintingDisabled()); |
| return m_canvas; |
| } |
| + |
| + void resetCanvas(SkCanvas* canvas) |
|
Stephen White
2014/07/09 20:04:07
Nit: probably no reason for this to be inlined. I'
Justin Novosad
2014/07/11 21:16:07
Done.
|
| + { |
| + ASSERT(canvas); |
| + m_canvas = canvas; |
| + m_opaqueRegion.reset(); |
| + } |
| + |
| bool paintingDisabled() const { return m_disabledState & PaintingDisabled; } |
| bool contextDisabled() const { return m_disabledState; } |
| @@ -291,6 +299,8 @@ public: |
| void drawImageBuffer(ImageBuffer*, const FloatRect& destRect, const FloatRect* srcRect = 0, CompositeOperator = CompositeSourceOver); |
| + void drawPicture(PassRefPtr<SkPicture>, const FloatRect& dest, const FloatRect& src, CompositeOperator, blink::WebBlendMode); |
| + |
| // These methods write to the canvas and modify the opaque region, if tracked. |
| // Also drawLine(const IntPoint& point1, const IntPoint& point2) and fillRoundedRect |
| void writePixels(const SkImageInfo&, const void* pixels, size_t rowBytes, int x, int y); |