Chromium Code Reviews| Index: Source/core/html/canvas/CanvasRenderingContext2D.h |
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h |
| index be6c4a0317c94bd424050e9c8a8f5b8ebc329c79..8644398ec52bf1f1856ccd3cc8d6c03063e71d0a 100644 |
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.h |
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.h |
| @@ -328,7 +328,35 @@ private: |
| void inflateStrokeRect(FloatRect&) const; |
| - template<class T> void fullCanvasCompositedFill(const T&); |
| + struct StrokePathFunctor { |
| + void operator()(const Path& path, GraphicsContext* context) |
| + { |
| + context->strokePath(path); |
| + } |
| + }; |
| + |
| + struct StrokeRectFunctor { |
| + void operator()(const FloatRect& rect, GraphicsContext* context) |
| + { |
| + context->strokeRect(rect); |
| + } |
| + }; |
| + |
| + struct FillPathFunctor { |
| + void operator()(const Path& path, GraphicsContext* context) |
| + { |
| + context->fillPath(path); |
| + } |
| + }; |
| + |
| + struct FillRectFunctor { |
| + void operator()(const FloatRect& rect, GraphicsContext* context) |
| + { |
| + context->fillRect(rect); |
| + } |
| + }; |
|
Justin Novosad
2014/04/07 15:50:30
These functors add unnecessary weight to the heade
|
| + |
| + template<class T, class Functor> void fullCanvasComposited(const T&, Functor); |
| template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, const FloatRect&, CompositeOperator); |
| bool focusRingCallIsValid(const Path&, Element*); |