OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
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 SkDevice_DEFINED | 8 #ifndef SkDevice_DEFINED |
9 #define SkDevice_DEFINED | 9 #define SkDevice_DEFINED |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 * Try to get read-only-access to the pixels behind the device. If successf
ul, this returns | 99 * Try to get read-only-access to the pixels behind the device. If successf
ul, this returns |
100 * true and fills-out the pixmap parameter. | 100 * true and fills-out the pixmap parameter. |
101 * | 101 * |
102 * On failure, returns false and ignores the pixmap parameter. | 102 * On failure, returns false and ignores the pixmap parameter. |
103 */ | 103 */ |
104 bool peekPixels(SkPixmap*); | 104 bool peekPixels(SkPixmap*); |
105 | 105 |
106 /** | 106 /** |
107 * Return the device's associated gpu render target, or NULL. | 107 * Return the device's associated gpu render target, or NULL. |
108 */ | 108 */ |
109 virtual GrRenderTarget* accessRenderTarget() { return NULL; } | 109 virtual GrRenderTarget* accessRenderTarget() { return nullptr; } |
110 | 110 |
| 111 /** |
| 112 * Don't call this! |
| 113 */ |
| 114 virtual GrDrawContext* accessDrawContext() { return nullptr; } |
111 | 115 |
112 /** | 116 /** |
113 * Return the device's origin: its offset in device coordinates from | 117 * Return the device's origin: its offset in device coordinates from |
114 * the default origin in its canvas' matrix/clip | 118 * the default origin in its canvas' matrix/clip |
115 */ | 119 */ |
116 const SkIPoint& getOrigin() const { return fOrigin; } | 120 const SkIPoint& getOrigin() const { return fOrigin; } |
117 | 121 |
118 /** | 122 /** |
119 * onAttachToCanvas is invoked whenever a device is installed in a canvas | 123 * onAttachToCanvas is invoked whenever a device is installed in a canvas |
120 * (i.e., setDevice, saveLayer (for the new device created by the save), | 124 * (i.e., setDevice, saveLayer (for the new device created by the save), |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 SkSurfaceProps fSurfaceProps; | 405 SkSurfaceProps fSurfaceProps; |
402 | 406 |
403 #ifdef SK_DEBUG | 407 #ifdef SK_DEBUG |
404 bool fAttachedToCanvas; | 408 bool fAttachedToCanvas; |
405 #endif | 409 #endif |
406 | 410 |
407 typedef SkRefCnt INHERITED; | 411 typedef SkRefCnt INHERITED; |
408 }; | 412 }; |
409 | 413 |
410 #endif | 414 #endif |
OLD | NEW |