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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 : fInfo(info) | 334 : fInfo(info) |
335 , fTileUsage(tileUsage) | 335 , fTileUsage(tileUsage) |
336 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) | 336 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) |
337 {} | 337 {} |
338 | 338 |
339 const SkImageInfo fInfo; | 339 const SkImageInfo fInfo; |
340 const TileUsage fTileUsage; | 340 const TileUsage fTileUsage; |
341 const SkPixelGeometry fPixelGeometry; | 341 const SkPixelGeometry fPixelGeometry; |
342 }; | 342 }; |
343 | 343 |
344 #ifdef SK_SUPPORT_LEGACY_ONCREATECOMPATIBLEDEVICE | |
345 // legacy method name -- please override onCreateDevice instead | |
346 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) { | |
347 return NULL; | |
348 } | |
349 #endif | |
350 | |
351 /** | 344 /** |
352 * Create a new device based on CreateInfo. If the paint is not null, then
it represents a | 345 * Create a new device based on CreateInfo. If the paint is not null, then
it represents a |
353 * preview of how the new device will be composed with its creator device (
this). | 346 * preview of how the new device will be composed with its creator device (
this). |
354 */ | 347 */ |
355 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { | 348 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { |
356 return NULL; | 349 return NULL; |
357 } | 350 } |
358 | 351 |
359 virtual void initForRootLayer(SkPixelGeometry geo); | 352 virtual void initForRootLayer(SkPixelGeometry geo); |
360 | 353 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 SkDeviceProperties* fLeakyProperties; // will always exist. | 385 SkDeviceProperties* fLeakyProperties; // will always exist. |
393 | 386 |
394 #ifdef SK_DEBUG | 387 #ifdef SK_DEBUG |
395 bool fAttachedToCanvas; | 388 bool fAttachedToCanvas; |
396 #endif | 389 #endif |
397 | 390 |
398 typedef SkRefCnt INHERITED; | 391 typedef SkRefCnt INHERITED; |
399 }; | 392 }; |
400 | 393 |
401 #endif | 394 #endif |
OLD | NEW |