Chromium Code Reviews| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 // beginLayer()/endLayer() behaves like save()/restore() for CTM and clip st ates. | 204 // beginLayer()/endLayer() behaves like save()/restore() for CTM and clip st ates. |
| 205 // Apply SkXfermode::Mode when the layer is composited on the backdrop (i.e. endLayer()). | 205 // Apply SkXfermode::Mode when the layer is composited on the backdrop (i.e. endLayer()). |
| 206 void beginLayer(float opacity = 1.0f, SkXfermode::Mode = SkXfermode::kSrcOve r_Mode, | 206 void beginLayer(float opacity = 1.0f, SkXfermode::Mode = SkXfermode::kSrcOve r_Mode, |
| 207 const FloatRect* = 0, ColorFilter = ColorFilterNone, SkImageFilter* = 0) ; | 207 const FloatRect* = 0, ColorFilter = ColorFilterNone, SkImageFilter* = 0) ; |
| 208 void endLayer(); | 208 void endLayer(); |
| 209 | 209 |
| 210 // Instead of being dispatched to the active canvas, draw commands following beginRecording() | 210 // Instead of being dispatched to the active canvas, draw commands following beginRecording() |
| 211 // are stored in a display list that can be replayed at a later time. Pass i n the bounding | 211 // are stored in a display list that can be replayed at a later time. Pass i n the bounding |
| 212 // rectangle for the content in the list. | 212 // rectangle for the content in the list. |
| 213 void beginRecording(const FloatRect&); | 213 void beginRecording(const FloatRect&); |
| 214 // Returns a picture with any recorded draw commands since the prerequisite call to beginRecording(), | |
| 215 // or nullptr if the canvas is disabled. | |
|
chrishtr
2016/03/29 22:42:23
add the second sentence
wkorman
2016/03/29 22:52:02
Done, more specific phrasing here since this is th
| |
| 214 PassRefPtr<SkPicture> endRecording(); | 216 PassRefPtr<SkPicture> endRecording(); |
| 215 | 217 |
| 216 void setShadow(const FloatSize& offset, float blur, const Color&, | 218 void setShadow(const FloatSize& offset, float blur, const Color&, |
| 217 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec tsTransforms, | 219 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec tsTransforms, |
| 218 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl pha, ShadowMode = DrawShadowAndForeground); | 220 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl pha, ShadowMode = DrawShadowAndForeground); |
| 219 | 221 |
| 220 // It is assumed that this draw looper is used only for shadows | 222 // It is assumed that this draw looper is used only for shadows |
| 221 // (i.e. a draw looper is set if and only if there is a shadow). | 223 // (i.e. a draw looper is set if and only if there is a shadow). |
| 222 // The builder passed into this method will be destroyed. | 224 // The builder passed into this method will be destroyed. |
| 223 void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); | 225 void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 | 372 |
| 371 float m_deviceScaleFactor; | 373 float m_deviceScaleFactor; |
| 372 | 374 |
| 373 unsigned m_printing : 1; | 375 unsigned m_printing : 1; |
| 374 unsigned m_hasMetaData : 1; | 376 unsigned m_hasMetaData : 1; |
| 375 }; | 377 }; |
| 376 | 378 |
| 377 } // namespace blink | 379 } // namespace blink |
| 378 | 380 |
| 379 #endif // GraphicsContext_h | 381 #endif // GraphicsContext_h |
| OLD | NEW |