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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 * Specify a device to be used by this canvas. Calling setDevice will | 47 * Specify a device to be used by this canvas. Calling setDevice will |
48 * release the previously set device, if any. Takes a reference on the | 48 * release the previously set device, if any. Takes a reference on the |
49 * device. | 49 * device. |
50 * | 50 * |
51 * @param device The device that the canvas will raw into | 51 * @param device The device that the canvas will raw into |
52 * @return The device argument, for convenience. | 52 * @return The device argument, for convenience. |
53 */ | 53 */ |
54 virtual SkDevice* setDevice(SkDevice* device); | 54 virtual SkDevice* setDevice(SkDevice* device); |
55 | 55 |
56 /** | 56 /** |
| 57 * Specify the surface to be used by this canvas. Calling setSurface will |
| 58 * release the previously set surface or device. Takes a reference on the |
| 59 * surface. |
| 60 * |
| 61 * @param surface The surface that the canvas will raw into |
| 62 * @return The surface argument, for convenience. |
| 63 */ |
| 64 SkSurface* setSurface(SkSurface* surface); |
| 65 |
| 66 /** |
57 * Specify a NotificationClient to be used by this canvas. Calling | 67 * Specify a NotificationClient to be used by this canvas. Calling |
58 * setNotificationClient will release the previously set | 68 * setNotificationClient will release the previously set |
59 * NotificationClient, if any. SkDeferredCanvas does not take ownership | 69 * NotificationClient, if any. SkDeferredCanvas does not take ownership |
60 * of the notification client. Therefore user code is resposible | 70 * of the notification client. Therefore user code is resposible |
61 * for its destruction. The notification client must be unregistered | 71 * for its destruction. The notification client must be unregistered |
62 * by calling setNotificationClient(NULL) if it is destroyed before | 72 * by calling setNotificationClient(NULL) if it is destroyed before |
63 * this canvas. | 73 * this canvas. |
64 * Note: Must be called after the device is set with setDevice. | 74 * Note: Must be called after the device is set with setDevice. |
65 * | 75 * |
66 * @param notificationClient interface for dispatching notifications | 76 * @param notificationClient interface for dispatching notifications |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 void validate() const; | 261 void validate() const; |
252 void init(); | 262 void init(); |
253 bool fDeferredDrawing; | 263 bool fDeferredDrawing; |
254 | 264 |
255 friend class SkDeferredCanvasTester; // for unit testing | 265 friend class SkDeferredCanvasTester; // for unit testing |
256 typedef SkCanvas INHERITED; | 266 typedef SkCanvas INHERITED; |
257 }; | 267 }; |
258 | 268 |
259 | 269 |
260 #endif | 270 #endif |
OLD | NEW |