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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h

Issue 1775153002: Make OffscreenCanvasRenderingContext2D renderable on a worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix non-oilpan build Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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/core/v8/UnionTypesCore.h" 8 #include "bindings/core/v8/UnionTypesCore.h"
9 #include "bindings/modules/v8/UnionTypesModules.h" 9 #include "bindings/modules/v8/UnionTypesModules.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "modules/canvas2d/CanvasGradient.h" 11 #include "modules/canvas2d/CanvasGradient.h"
12 #include "modules/canvas2d/CanvasPathMethods.h" 12 #include "modules/canvas2d/CanvasPathMethods.h"
13 #include "modules/canvas2d/CanvasRenderingContext2DState.h" 13 #include "modules/canvas2d/CanvasRenderingContext2DState.h"
14 #include "modules/canvas2d/CanvasStyle.h" 14 #include "modules/canvas2d/CanvasStyle.h"
15 #include "third_party/skia/include/core/SkCanvas.h" 15 #include "third_party/skia/include/core/SkCanvas.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class CanvasImageSource; 19 class CanvasImageSource;
20 class Color; 20 class Color;
21 class FilterOperations;
21 class Image; 22 class Image;
22 class ImageBuffer; 23 class ImageBuffer;
23 class Path2D; 24 class Path2D;
24 class SVGMatrixTearOff; 25 class SVGMatrixTearOff;
25 26
26 typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmap Canva sImageSourceUnion; 27 typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmap Canva sImageSourceUnion;
27 28
28 class MODULES_EXPORT BaseRenderingContext2D : public WillBeGarbageCollectedMixin , public CanvasPathMethods { 29 class MODULES_EXPORT BaseRenderingContext2D : public WillBeGarbageCollectedMixin , public CanvasPathMethods {
29 WTF_MAKE_NONCOPYABLE(BaseRenderingContext2D); 30 WTF_MAKE_NONCOPYABLE(BaseRenderingContext2D);
30 public: 31 public:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 149
149 virtual bool stateHasFilter() = 0; 150 virtual bool stateHasFilter() = 0;
150 virtual SkImageFilter* stateGetFilter() = 0; 151 virtual SkImageFilter* stateGetFilter() = 0;
151 152
152 virtual void validateStateStack() = 0; 153 virtual void validateStateStack() = 0;
153 154
154 virtual bool hasAlpha() const = 0; 155 virtual bool hasAlpha() const = 0;
155 156
156 virtual bool isContextLost() const = 0; 157 virtual bool isContextLost() const = 0;
157 158
159 virtual void updateFilterReferences(const FilterOperations& filters) { }
Stephen White 2016/03/08 22:46:32 Could these filter-related changes be made in anot
160
158 DECLARE_VIRTUAL_TRACE(); 161 DECLARE_VIRTUAL_TRACE();
159 162
160 protected: 163 protected:
161 BaseRenderingContext2D(); 164 BaseRenderingContext2D();
162 165
163 CanvasRenderingContext2DState& modifiableState(); 166 CanvasRenderingContext2DState& modifiableState();
164 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); } 167 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); }
165 168
166 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*); 169 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*);
167 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*); 170 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode); 285 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
283 c->setMatrix(ctm); 286 c->setMatrix(ctm);
284 drawFunc(c, &foregroundPaint); 287 drawFunc(c, &foregroundPaint);
285 c->restore(); 288 c->restore();
286 c->setMatrix(ctm); 289 c->setMatrix(ctm);
287 } 290 }
288 291
289 } // namespace blink 292 } // namespace blink
290 293
291 #endif // BaseRenderingContext2D_h 294 #endif // BaseRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698