OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #ifndef GraphicsContext_h | 28 #ifndef GraphicsContext_h |
29 #define GraphicsContext_h | 29 #define GraphicsContext_h |
30 | 30 |
31 #include "core/platform/chromium/TraceEvent.h" | 31 #include "core/platform/chromium/TraceEvent.h" |
32 #include "core/platform/graphics/DashArray.h" | 32 #include "core/platform/graphics/DashArray.h" |
| 33 #include "core/platform/graphics/DrawLooper.h" |
33 #include "core/platform/graphics/FloatRect.h" | 34 #include "core/platform/graphics/FloatRect.h" |
34 #include "core/platform/graphics/Font.h" | 35 #include "core/platform/graphics/Font.h" |
35 #include "core/platform/graphics/GraphicsContextState.h" | 36 #include "core/platform/graphics/GraphicsContextState.h" |
36 #include "core/platform/graphics/ImageOrientation.h" | 37 #include "core/platform/graphics/ImageOrientation.h" |
37 #include "core/platform/graphics/skia/OpaqueRegionSkia.h" | 38 #include "core/platform/graphics/skia/OpaqueRegionSkia.h" |
38 | 39 |
39 #include "third_party/skia/include/core/SkBitmap.h" | 40 #include "third_party/skia/include/core/SkBitmap.h" |
40 #include "third_party/skia/include/core/SkDevice.h" | 41 #include "third_party/skia/include/core/SkDevice.h" |
41 #include "third_party/skia/include/core/SkPaint.h" | 42 #include "third_party/skia/include/core/SkPaint.h" |
42 #include "third_party/skia/include/core/SkPath.h" | 43 #include "third_party/skia/include/core/SkPath.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 void setUpdatingControlTints(bool); | 310 void setUpdatingControlTints(bool); |
310 | 311 |
311 void beginTransparencyLayer(float opacity); | 312 void beginTransparencyLayer(float opacity); |
312 void endTransparencyLayer(); | 313 void endTransparencyLayer(); |
313 // Begins a layer that is clipped to the image |imageBuffer| at the location | 314 // Begins a layer that is clipped to the image |imageBuffer| at the location |
314 // |rect|. This layer is implicitly restored when the next restore is invoke
d. | 315 // |rect|. This layer is implicitly restored when the next restore is invoke
d. |
315 // NOTE: |imageBuffer| may be deleted before the |restore| is invoked. | 316 // NOTE: |imageBuffer| may be deleted before the |restore| is invoked. |
316 void beginLayerClippedToImage(const FloatRect&, const ImageBuffer*); | 317 void beginLayerClippedToImage(const FloatRect&, const ImageBuffer*); |
317 | 318 |
318 bool hasShadow() const; | 319 bool hasShadow() const; |
319 void setShadow(const FloatSize&, float blur, const Color&, ColorSpace); | 320 void setShadow(const FloatSize& offset, float blur, const Color&, |
| 321 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); |
| 322 void clearShadow() { clearDrawLooper(); } |
320 | 323 |
321 bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const; | 324 // It is assumed that this draw looper is used only for shadows |
322 void clearShadow(); | 325 // (i.e. a draw looper is set if and only if there is a shadow). |
| 326 void setDrawLooper(DrawLooper&); |
| 327 void clearDrawLooper(); |
323 | 328 |
324 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); | 329 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); |
325 void drawFocusRing(const Path&, int width, int offset, const Color&); | 330 void drawFocusRing(const Path&, int width, int offset, const Color&); |
326 | 331 |
327 void setLineCap(LineCap); | 332 void setLineCap(LineCap); |
328 void setLineDash(const DashArray&, float dashOffset); | 333 void setLineDash(const DashArray&, float dashOffset); |
329 void setLineJoin(LineJoin); | 334 void setLineJoin(LineJoin); |
330 void setMiterLimit(float); | 335 void setMiterLimit(float); |
331 | 336 |
332 void setAlpha(float); | 337 void setAlpha(float); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 // FIXME: Make this go away: crbug.com/236892 | 509 // FIXME: Make this go away: crbug.com/236892 |
505 bool m_updatingControlTints : 1; | 510 bool m_updatingControlTints : 1; |
506 bool m_accelerated : 1; | 511 bool m_accelerated : 1; |
507 bool m_isCertainlyOpaque : 1; | 512 bool m_isCertainlyOpaque : 1; |
508 bool m_printing : 1; | 513 bool m_printing : 1; |
509 }; | 514 }; |
510 | 515 |
511 } // namespace WebCore | 516 } // namespace WebCore |
512 | 517 |
513 #endif // GraphicsContext_h | 518 #endif // GraphicsContext_h |
OLD | NEW |