OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
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 | 9 |
10 #ifndef SkPixelRef_DEFINED | 10 #ifndef SkPixelRef_DEFINED |
11 #define SkPixelRef_DEFINED | 11 #define SkPixelRef_DEFINED |
12 | 12 |
13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
14 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
15 #include "SkString.h" | 15 #include "SkString.h" |
16 #include "SkFlattenable.h" | 16 #include "SkFlattenable.h" |
17 #include "SkTDArray.h" | 17 #include "SkTDArray.h" |
18 | 18 |
19 #define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR | 19 //#define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR |
20 | 20 |
21 #ifdef SK_DEBUG | 21 #ifdef SK_DEBUG |
22 /** | 22 /** |
23 * Defining SK_IGNORE_PIXELREF_SETPRELOCKED will force all pixelref | 23 * Defining SK_IGNORE_PIXELREF_SETPRELOCKED will force all pixelref |
24 * subclasses to correctly handle lock/unlock pixels. For performance | 24 * subclasses to correctly handle lock/unlock pixels. For performance |
25 * reasons, simple malloc-based subclasses call setPreLocked() to skip | 25 * reasons, simple malloc-based subclasses call setPreLocked() to skip |
26 * the overhead of implementing these calls. | 26 * the overhead of implementing these calls. |
27 * | 27 * |
28 * This build-flag disables that optimization, to add in debugging our | 28 * This build-flag disables that optimization, to add in debugging our |
29 * call-sites, to ensure that they correctly balance their calls of | 29 * call-sites, to ensure that they correctly balance their calls of |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 // When copying a bitmap to another with the same shape and config, we can s
afely | 328 // When copying a bitmap to another with the same shape and config, we can s
afely |
329 // clone the pixelref generation ID too, which makes them equivalent under c
aching. | 329 // clone the pixelref generation ID too, which makes them equivalent under c
aching. |
330 friend class SkBitmap; // only for cloneGenID | 330 friend class SkBitmap; // only for cloneGenID |
331 void cloneGenID(const SkPixelRef&); | 331 void cloneGenID(const SkPixelRef&); |
332 | 332 |
333 typedef SkFlattenable INHERITED; | 333 typedef SkFlattenable INHERITED; |
334 }; | 334 }; |
335 | 335 |
336 #endif | 336 #endif |
OLD | NEW |