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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 | 341 |
342 const SkImageInfo fInfo; | 342 const SkImageInfo fInfo; |
343 const TileUsage fTileUsage; | 343 const TileUsage fTileUsage; |
344 const SkPixelGeometry fPixelGeometry; | 344 const SkPixelGeometry fPixelGeometry; |
345 const bool fForImageFilter; | 345 const bool fForImageFilter; |
346 }; | 346 }; |
347 | 347 |
348 /** | 348 /** |
349 * Create a new device based on CreateInfo. If the paint is not null, then it represents a | 349 * Create a new device based on CreateInfo. If the paint is not null, then it represents a |
350 * preview of how the new device will be composed with its creator device ( this). | 350 * preview of how the new device will be composed with its creator device ( this). |
351 * | |
robertphillips
2015/04/29 14:55:54
"device back layer" -> "device back" ?
reed1
2015/04/29 15:20:47
Done.
| |
352 * The subclass may be handed this device back layer (drawDevice), so it mu st always return | |
353 * a device that it knows how to draw, and that it knows how to identify if it is not of the | |
354 * same subclass (since drawDevice is passed a SkBaseDevice*). If the subcl ass cannot fulfill | |
355 * that contract (e.g. PDF cannot support some settings on the paint) it sh ould return NULL, | |
356 * and the caller may then decide to explicitly create a bitmapdevice, know ing that later | |
357 * it could not call drawDevice with it (but it could call drawSprite or dr awBitmap). | |
351 */ | 358 */ |
352 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { | 359 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { |
353 return NULL; | 360 return NULL; |
354 } | 361 } |
355 | 362 |
356 virtual void initForRootLayer(SkPixelGeometry geo); | 363 virtual void initForRootLayer(SkPixelGeometry geo); |
357 | 364 |
358 private: | 365 private: |
359 friend class SkCanvas; | 366 friend class SkCanvas; |
360 friend struct DeviceCM; //for setMatrixClip | 367 friend struct DeviceCM; //for setMatrixClip |
(...skipping 28 matching lines...) Expand all Loading... | |
389 SkDeviceProperties* fLeakyProperties; // will always exist. | 396 SkDeviceProperties* fLeakyProperties; // will always exist. |
390 | 397 |
391 #ifdef SK_DEBUG | 398 #ifdef SK_DEBUG |
392 bool fAttachedToCanvas; | 399 bool fAttachedToCanvas; |
393 #endif | 400 #endif |
394 | 401 |
395 typedef SkRefCnt INHERITED; | 402 typedef SkRefCnt INHERITED; |
396 }; | 403 }; |
397 | 404 |
398 #endif | 405 #endif |
OLD | NEW |