OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkDeferredCanvas_DEFINED | 8 #ifndef SkDeferredCanvas_DEFINED |
9 #define SkDeferredCanvas_DEFINED | 9 #define SkDeferredCanvas_DEFINED |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 class SK_API SkDeferredCanvas : public SkCanvas { | 26 class SK_API SkDeferredCanvas : public SkCanvas { |
27 public: | 27 public: |
28 class SK_API NotificationClient; | 28 class SK_API NotificationClient; |
29 | 29 |
30 /** Construct a canvas with the specified surface to draw into. | 30 /** Construct a canvas with the specified surface to draw into. |
31 This factory must be used for newImageSnapshot to work. | 31 This factory must be used for newImageSnapshot to work. |
32 @param surface Specifies a surface for the canvas to draw into. | 32 @param surface Specifies a surface for the canvas to draw into. |
33 */ | 33 */ |
34 static SkDeferredCanvas* Create(SkSurface* surface); | 34 static SkDeferredCanvas* Create(SkSurface* surface); |
35 | 35 |
36 static SkDeferredCanvas* Create(SkBaseDevice* device); | 36 // static SkDeferredCanvas* Create(SkBaseDevice* device); |
37 | 37 |
38 virtual ~SkDeferredCanvas(); | 38 virtual ~SkDeferredCanvas(); |
39 | 39 |
40 /** | 40 /** |
41 * Specify the surface to be used by this canvas. Calling setSurface will | 41 * Specify the surface to be used by this canvas. Calling setSurface will |
42 * release the previously set surface or device. Takes a reference on the | 42 * release the previously set surface or device. Takes a reference on the |
43 * surface. | 43 * surface. |
44 * | 44 * |
45 * @param surface The surface that the canvas will raw into | 45 * @param surface The surface that the canvas will raw into |
46 * @return The surface argument, for convenience. | 46 * @return The surface argument, for convenience. |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 void validate() const; | 247 void validate() const; |
248 void init(); | 248 void init(); |
249 bool fDeferredDrawing; | 249 bool fDeferredDrawing; |
250 | 250 |
251 friend class SkDeferredCanvasTester; // for unit testing | 251 friend class SkDeferredCanvasTester; // for unit testing |
252 typedef SkCanvas INHERITED; | 252 typedef SkCanvas INHERITED; |
253 }; | 253 }; |
254 | 254 |
255 | 255 |
256 #endif | 256 #endif |
OLD | NEW |