| 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 void init(SkBitmap::Config config, int width, int height, bool isOpaque); | |
| 262 | |
| 263 // used to change the backend's pixels (and possibly config/rowbytes) | 261 // used to change the backend's pixels (and possibly config/rowbytes) |
| 264 // but cannot change the width/height, so there should be no change to | 262 // but cannot change the width/height, so there should be no change to |
| 265 // any clip information. | 263 // any clip information. |
| 266 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; | 264 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; |
| 267 | 265 |
| 268 /** | 266 /** |
| 269 * Subclasses should override this to implement createCompatibleDevice. | 267 * Subclasses should override this to implement createCompatibleDevice. |
| 270 */ | 268 */ |
| 271 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, | 269 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, |
| 272 int width, int height, | 270 int width, int height, |
| 273 bool isOpaque, | 271 bool isOpaque, |
| 274 Usage usage) SK_OVERRIDE; | 272 Usage usage) SK_OVERRIDE; |
| 275 | 273 |
| 276 /** Causes any deferred drawing to the device to be completed. | 274 /** Causes any deferred drawing to the device to be completed. |
| 277 */ | 275 */ |
| 278 virtual void flush() SK_OVERRIDE {} | 276 virtual void flush() SK_OVERRIDE {} |
| 279 | 277 |
| 280 SkBitmap fBitmap; | 278 SkBitmap fBitmap; |
| 281 | 279 |
| 282 typedef SkBaseDevice INHERITED; | 280 typedef SkBaseDevice INHERITED; |
| 283 }; | 281 }; |
| 284 | 282 |
| 285 #endif // SkBitmapDevice_DEFINED | 283 #endif // SkBitmapDevice_DEFINED |
| OLD | NEW |