| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CanvasRenderingContext2D_h | 26 #ifndef CanvasRenderingContext2D_h |
| 27 #define CanvasRenderingContext2D_h | 27 #define CanvasRenderingContext2D_h |
| 28 | 28 |
| 29 #include "core/html/canvas/Canvas2DContextAttributes.h" | 29 #include "core/html/canvas/Canvas2DContextAttributes.h" |
| 30 #include "core/html/canvas/CanvasPathMethods.h" | 30 #include "core/html/canvas/CanvasPathMethods.h" |
| 31 #include "core/html/canvas/CanvasRenderingContext.h" | 31 #include "core/html/canvas/CanvasRenderingContext.h" |
| 32 #include "core/platform/graphics/Color.h" | 32 #include "core/platform/graphics/Color.h" |
| 33 #include "core/platform/graphics/ColorSpace.h" | |
| 34 #include "core/platform/graphics/DashArray.h" | 33 #include "core/platform/graphics/DashArray.h" |
| 35 #include "core/platform/graphics/FloatSize.h" | 34 #include "core/platform/graphics/FloatSize.h" |
| 36 #include "core/platform/graphics/Font.h" | 35 #include "core/platform/graphics/Font.h" |
| 37 #include "core/platform/graphics/GraphicsTypes.h" | 36 #include "core/platform/graphics/GraphicsTypes.h" |
| 38 #include "core/platform/graphics/ImageBuffer.h" | 37 #include "core/platform/graphics/ImageBuffer.h" |
| 39 #include "core/platform/graphics/Path.h" | 38 #include "core/platform/graphics/Path.h" |
| 40 #include "core/platform/graphics/PlatformLayer.h" | 39 #include "core/platform/graphics/PlatformLayer.h" |
| 41 #include "core/platform/graphics/transforms/AffineTransform.h" | 40 #include "core/platform/graphics/transforms/AffineTransform.h" |
| 42 #include <wtf/text/WTFString.h> | 41 #include <wtf/text/WTFString.h> |
| 43 #include <wtf/Vector.h> | 42 #include <wtf/Vector.h> |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 Path transformAreaToDevice(const FloatRect&) const; | 303 Path transformAreaToDevice(const FloatRect&) const; |
| 305 bool rectContainsCanvas(const FloatRect&) const; | 304 bool rectContainsCanvas(const FloatRect&) const; |
| 306 | 305 |
| 307 template<class T> IntRect calculateCompositingBufferRect(const T&, IntSize*)
; | 306 template<class T> IntRect calculateCompositingBufferRect(const T&, IntSize*)
; |
| 308 PassOwnPtr<ImageBuffer> createCompositingBuffer(const IntRect&); | 307 PassOwnPtr<ImageBuffer> createCompositingBuffer(const IntRect&); |
| 309 void compositeBuffer(ImageBuffer*, const IntRect&, CompositeOperator); | 308 void compositeBuffer(ImageBuffer*, const IntRect&, CompositeOperator); |
| 310 | 309 |
| 311 void inflateStrokeRect(FloatRect&) const; | 310 void inflateStrokeRect(FloatRect&) const; |
| 312 | 311 |
| 313 template<class T> void fullCanvasCompositedFill(const T&); | 312 template<class T> void fullCanvasCompositedFill(const T&); |
| 314 template<class T> void fullCanvasCompositedDrawImage(T*, ColorSpace, const F
loatRect&, const FloatRect&, CompositeOperator); | 313 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); |
| 315 | 314 |
| 316 PassRefPtr<ImageData> getImageData(ImageBuffer::CoordinateSystem, float sx,
float sy, float sw, float sh, ExceptionCode&) const; | 315 PassRefPtr<ImageData> getImageData(ImageBuffer::CoordinateSystem, float sx,
float sy, float sw, float sh, ExceptionCode&) const; |
| 317 void putImageData(ImageData*, ImageBuffer::CoordinateSystem, float dx, float
dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionC
ode&); | 316 void putImageData(ImageData*, ImageBuffer::CoordinateSystem, float dx, float
dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionC
ode&); |
| 318 | 317 |
| 319 virtual bool is2d() const OVERRIDE { return true; } | 318 virtual bool is2d() const OVERRIDE { return true; } |
| 320 virtual bool isAccelerated() const OVERRIDE; | 319 virtual bool isAccelerated() const OVERRIDE; |
| 321 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } | 320 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } |
| 322 | 321 |
| 323 virtual bool isTransformInvertible() const { return state().m_invertibleCTM;
} | 322 virtual bool isTransformInvertible() const { return state().m_invertibleCTM;
} |
| 324 | 323 |
| 325 virtual PlatformLayer* platformLayer() const OVERRIDE; | 324 virtual PlatformLayer* platformLayer() const OVERRIDE; |
| 326 | 325 |
| 327 Vector<State, 1> m_stateStack; | 326 Vector<State, 1> m_stateStack; |
| 328 unsigned m_unrealizedSaveCount; | 327 unsigned m_unrealizedSaveCount; |
| 329 bool m_usesCSSCompatibilityParseMode; | 328 bool m_usesCSSCompatibilityParseMode; |
| 330 bool m_hasAlpha; | 329 bool m_hasAlpha; |
| 331 }; | 330 }; |
| 332 | 331 |
| 333 } // namespace WebCore | 332 } // namespace WebCore |
| 334 | 333 |
| 335 #endif | 334 #endif |
| OLD | NEW |