| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
| 10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 private: | 251 private: |
| 252 friend class SkCanvas; | 252 friend class SkCanvas; |
| 253 friend struct DeviceCM; //for setMatrixClip | 253 friend struct DeviceCM; //for setMatrixClip |
| 254 friend class SkDraw; | 254 friend class SkDraw; |
| 255 friend class SkDrawIter; | 255 friend class SkDrawIter; |
| 256 friend class SkDeviceFilteredPaint; | 256 friend class SkDeviceFilteredPaint; |
| 257 friend class SkDeviceImageFilterProxy; | 257 friend class SkDeviceImageFilterProxy; |
| 258 | 258 |
| 259 friend class SkSurface_Raster; | 259 friend class SkSurface_Raster; |
| 260 | 260 |
| 261 // only call from constructor, to try to allocate the pixels | 261 void init(SkBitmap::Config config, int width, int height, bool isOpaque); |
| 262 void init(SkBitmap::Config, int width, int height, bool isOpaque); | |
| 263 | 262 |
| 264 // used to change the backend's pixels (and possibly config/rowbytes) | 263 // used to change the backend's pixels (and possibly config/rowbytes) |
| 265 // but cannot change the width/height, so there should be no change to | 264 // but cannot change the width/height, so there should be no change to |
| 266 // any clip information. | 265 // any clip information. |
| 267 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; | 266 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; |
| 268 | 267 |
| 269 /** | 268 /** |
| 270 * Subclasses should override this to implement createCompatibleDevice. | 269 * Subclasses should override this to implement createCompatibleDevice. |
| 271 */ | 270 */ |
| 272 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, | 271 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, |
| 273 int width, int height, | 272 int width, int height, |
| 274 bool isOpaque, | 273 bool isOpaque, |
| 275 Usage usage) SK_OVERRIDE; | 274 Usage usage) SK_OVERRIDE; |
| 276 | 275 |
| 277 /** Causes any deferred drawing to the device to be completed. | 276 /** Causes any deferred drawing to the device to be completed. |
| 278 */ | 277 */ |
| 279 virtual void flush() SK_OVERRIDE {} | 278 virtual void flush() SK_OVERRIDE {} |
| 280 | 279 |
| 281 SkBitmap fBitmap; | 280 SkBitmap fBitmap; |
| 282 | 281 |
| 283 typedef SkBaseDevice INHERITED; | 282 typedef SkBaseDevice INHERITED; |
| 284 }; | 283 }; |
| 285 | 284 |
| 286 #endif // SkBitmapDevice_DEFINED | 285 #endif // SkBitmapDevice_DEFINED |
| OLD | NEW |