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 15 matching lines...) Expand all Loading... |
26 */ | 26 */ |
27 | 27 |
28 #ifndef GraphicsContext_h | 28 #ifndef GraphicsContext_h |
29 #define GraphicsContext_h | 29 #define GraphicsContext_h |
30 | 30 |
31 #include "platform/PlatformExport.h" | 31 #include "platform/PlatformExport.h" |
32 #include "platform/TraceEvent.h" | 32 #include "platform/TraceEvent.h" |
33 #include "platform/fonts/Font.h" | 33 #include "platform/fonts/Font.h" |
34 #include "platform/geometry/FloatRect.h" | 34 #include "platform/geometry/FloatRect.h" |
35 #include "platform/graphics/DashArray.h" | 35 #include "platform/graphics/DashArray.h" |
36 #include "platform/graphics/DrawLooperBuilder.h" | 36 #include "platform/graphics/DrawLooper.h" |
37 #include "platform/graphics/ImageBufferSurface.h" | 37 #include "platform/graphics/ImageBufferSurface.h" |
38 #include "platform/graphics/ImageOrientation.h" | 38 #include "platform/graphics/ImageOrientation.h" |
39 #include "platform/graphics/GraphicsContextAnnotation.h" | 39 #include "platform/graphics/GraphicsContextAnnotation.h" |
40 #include "platform/graphics/GraphicsContextState.h" | 40 #include "platform/graphics/GraphicsContextState.h" |
41 #include "platform/graphics/skia/OpaqueRegionSkia.h" | 41 #include "platform/graphics/skia/OpaqueRegionSkia.h" |
42 #include "platform/graphics/skia/SkiaUtils.h" | 42 #include "platform/graphics/skia/SkiaUtils.h" |
43 #include "wtf/FastAllocBase.h" | 43 #include "wtf/FastAllocBase.h" |
44 #include "wtf/Forward.h" | 44 #include "wtf/Forward.h" |
45 #include "wtf/Noncopyable.h" | 45 #include "wtf/Noncopyable.h" |
46 #include "wtf/PassOwnPtr.h" | 46 #include "wtf/PassOwnPtr.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo
rFilter = ColorFilterNone, ImageFilter* = 0); | 307 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo
rFilter = ColorFilterNone, ImageFilter* = 0); |
308 void endLayer(); | 308 void endLayer(); |
309 | 309 |
310 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() | 310 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() |
311 // are stored in a display list that can be replayed at a later time. | 311 // are stored in a display list that can be replayed at a later time. |
312 void beginRecording(const FloatRect& bounds); | 312 void beginRecording(const FloatRect& bounds); |
313 PassRefPtr<DisplayList> endRecording(); | 313 PassRefPtr<DisplayList> endRecording(); |
314 | 314 |
315 bool hasShadow() const; | 315 bool hasShadow() const; |
316 void setShadow(const FloatSize& offset, float blur, const Color&, | 316 void setShadow(const FloatSize& offset, float blur, const Color&, |
317 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec
tsTransforms, | 317 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, |
318 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl
pha); | 318 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); |
319 void clearShadow() { clearDrawLooper(); } | 319 void clearShadow() { clearDrawLooper(); } |
320 | 320 |
321 // It is assumed that this draw looper is used only for shadows | 321 // It is assumed that this draw looper is used only for shadows |
322 // (i.e. a draw looper is set if and only if there is a shadow). | 322 // (i.e. a draw looper is set if and only if there is a shadow). |
323 // The builder passed into this method will be destroyed. | 323 void setDrawLooper(const DrawLooper&); |
324 void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); | |
325 void clearDrawLooper(); | 324 void clearDrawLooper(); |
326 | 325 |
327 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); | 326 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); |
328 void drawFocusRing(const Path&, int width, int offset, const Color&); | 327 void drawFocusRing(const Path&, int width, int offset, const Color&); |
329 | 328 |
330 enum Edge { | 329 enum Edge { |
331 NoEdge = 0, | 330 NoEdge = 0, |
332 TopEdge = 1 << 1, | 331 TopEdge = 1 << 1, |
333 RightEdge = 1 << 2, | 332 RightEdge = 1 << 2, |
334 BottomEdge = 1 << 3, | 333 BottomEdge = 1 << 3, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // FIXME: Make this go away: crbug.com/236892 | 509 // FIXME: Make this go away: crbug.com/236892 |
511 bool m_updatingControlTints : 1; | 510 bool m_updatingControlTints : 1; |
512 bool m_accelerated : 1; | 511 bool m_accelerated : 1; |
513 bool m_isCertainlyOpaque : 1; | 512 bool m_isCertainlyOpaque : 1; |
514 bool m_printing : 1; | 513 bool m_printing : 1; |
515 }; | 514 }; |
516 | 515 |
517 } // namespace WebCore | 516 } // namespace WebCore |
518 | 517 |
519 #endif // GraphicsContext_h | 518 #endif // GraphicsContext_h |
OLD | NEW |