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/DrawLooper.h" | 36 #include "platform/graphics/DrawLooperBuilder.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 "wtf/FastAllocBase.h" | 42 #include "wtf/FastAllocBase.h" |
43 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
44 #include "wtf/Noncopyable.h" | 44 #include "wtf/Noncopyable.h" |
45 #include "wtf/PassOwnPtr.h" | 45 #include "wtf/PassOwnPtr.h" |
46 | 46 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo
rFilter = ColorFilterNone, ImageFilter* = 0); | 305 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo
rFilter = ColorFilterNone, ImageFilter* = 0); |
306 void endLayer(); | 306 void endLayer(); |
307 | 307 |
308 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() | 308 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() |
309 // are stored in a display list that can be replayed at a later time. | 309 // are stored in a display list that can be replayed at a later time. |
310 void beginRecording(const FloatRect& bounds); | 310 void beginRecording(const FloatRect& bounds); |
311 PassRefPtr<DisplayList> endRecording(); | 311 PassRefPtr<DisplayList> endRecording(); |
312 | 312 |
313 bool hasShadow() const; | 313 bool hasShadow() const; |
314 void setShadow(const FloatSize& offset, float blur, const Color&, | 314 void setShadow(const FloatSize& offset, float blur, const Color&, |
315 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, | 315 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec
tsTransforms, |
316 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); | 316 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl
pha); |
317 void clearShadow() { clearDrawLooper(); } | 317 void clearShadow() { clearDrawLooper(); } |
318 | 318 |
319 // It is assumed that this draw looper is used only for shadows | 319 // It is assumed that this draw looper is used only for shadows |
320 // (i.e. a draw looper is set if and only if there is a shadow). | 320 // (i.e. a draw looper is set if and only if there is a shadow). |
321 void setDrawLooper(const DrawLooper&); | 321 // The builder passed into this method will be destroyed. |
| 322 void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); |
322 void clearDrawLooper(); | 323 void clearDrawLooper(); |
323 | 324 |
324 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); | 325 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo
r&); |
325 void drawFocusRing(const Path&, int width, int offset, const Color&); | 326 void drawFocusRing(const Path&, int width, int offset, const Color&); |
326 | 327 |
327 enum Edge { | 328 enum Edge { |
328 NoEdge = 0, | 329 NoEdge = 0, |
329 TopEdge = 1 << 1, | 330 TopEdge = 1 << 1, |
330 RightEdge = 1 << 2, | 331 RightEdge = 1 << 2, |
331 BottomEdge = 1 << 3, | 332 BottomEdge = 1 << 3, |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 // FIXME: Make this go away: crbug.com/236892 | 501 // FIXME: Make this go away: crbug.com/236892 |
501 bool m_updatingControlTints : 1; | 502 bool m_updatingControlTints : 1; |
502 bool m_accelerated : 1; | 503 bool m_accelerated : 1; |
503 bool m_isCertainlyOpaque : 1; | 504 bool m_isCertainlyOpaque : 1; |
504 bool m_printing : 1; | 505 bool m_printing : 1; |
505 }; | 506 }; |
506 | 507 |
507 } // namespace WebCore | 508 } // namespace WebCore |
508 | 509 |
509 #endif // GraphicsContext_h | 510 #endif // GraphicsContext_h |
OLD | NEW |