| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 // beginLayer()/endLayer() behaves like save()/restore() for CTM and clip st
ates. | 258 // beginLayer()/endLayer() behaves like save()/restore() for CTM and clip st
ates. |
| 259 // Apply SkXfermode::Mode when the layer is composited on the backdrop (i.e.
endLayer()). | 259 // Apply SkXfermode::Mode when the layer is composited on the backdrop (i.e.
endLayer()). |
| 260 void beginLayer(float opacity = 1.0f, SkXfermode::Mode = SkXfermode::kSrcOve
r_Mode, | 260 void beginLayer(float opacity = 1.0f, SkXfermode::Mode = SkXfermode::kSrcOve
r_Mode, |
| 261 const FloatRect* = 0, ColorFilter = ColorFilterNone, SkImageFilter* = 0)
; | 261 const FloatRect* = 0, ColorFilter = ColorFilterNone, SkImageFilter* = 0)
; |
| 262 void endLayer(); | 262 void endLayer(); |
| 263 | 263 |
| 264 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() | 264 // Instead of being dispatched to the active canvas, draw commands following
beginRecording() |
| 265 // are stored in a display list that can be replayed at a later time. Pass i
n the bounding | 265 // are stored in a display list that can be replayed at a later time. Pass i
n the bounding |
| 266 // rectangle for the content in the list. | 266 // rectangle for the content in the list. |
| 267 void beginRecording(const FloatRect&, uint32_t = 0); | 267 void beginRecording(const FloatRect&); |
| 268 PassRefPtr<const SkPicture> endRecording(); | 268 PassRefPtr<const SkPicture> endRecording(); |
| 269 | 269 |
| 270 void setShadow(const FloatSize& offset, float blur, const Color&, | 270 void setShadow(const FloatSize& offset, float blur, const Color&, |
| 271 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec
tsTransforms, | 271 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec
tsTransforms, |
| 272 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl
pha, ShadowMode = DrawShadowAndForeground); | 272 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl
pha, ShadowMode = DrawShadowAndForeground); |
| 273 void clearShadow() { clearDrawLooper(); clearDropShadowImageFilter(); } | 273 void clearShadow() { clearDrawLooper(); clearDropShadowImageFilter(); } |
| 274 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); | 274 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); |
| 275 | 275 |
| 276 // It is assumed that this draw looper is used only for shadows | 276 // It is assumed that this draw looper is used only for shadows |
| 277 // (i.e. a draw looper is set if and only if there is a shadow). | 277 // (i.e. a draw looper is set if and only if there is a shadow). |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 float m_deviceScaleFactor; | 442 float m_deviceScaleFactor; |
| 443 | 443 |
| 444 unsigned m_accelerated : 1; | 444 unsigned m_accelerated : 1; |
| 445 unsigned m_printing : 1; | 445 unsigned m_printing : 1; |
| 446 unsigned m_antialiasHairlineImages : 1; | 446 unsigned m_antialiasHairlineImages : 1; |
| 447 }; | 447 }; |
| 448 | 448 |
| 449 } // namespace blink | 449 } // namespace blink |
| 450 | 450 |
| 451 #endif // GraphicsContext_h | 451 #endif // GraphicsContext_h |
| OLD | NEW |