OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 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 SkBitmapProcShader_DEFINED | 10 #ifndef SkBitmapProcShader_DEFINED |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 42 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
43 | 43 |
44 SkBitmap fRawBitmap; // experimental for RLE encoding | 44 SkBitmap fRawBitmap; // experimental for RLE encoding |
45 SkBitmapProcState fState; | 45 SkBitmapProcState fState; |
46 uint32_t fFlags; | 46 uint32_t fFlags; |
47 | 47 |
48 private: | 48 private: |
49 typedef SkShader INHERITED; | 49 typedef SkShader INHERITED; |
50 }; | 50 }; |
51 | 51 |
52 // Commonly used allocator. It currently is only used to allocate up to 2 object
s. The total | 52 // Commonly used allocator. It currently is only used to allocate up to 3 object
s. The total |
53 // bytes requested is calculated using one of our large shaders plus the size of
an Sk3DBlitter | 53 // bytes requested is calculated using one of our large shaders plus the size of
an Sk3DBlitter |
54 // in SkDraw.cpp | 54 // in SkDraw.cpp |
55 typedef SkSmallAllocator<2, sizeof(SkBitmapProcShader) + sizeof(void*) * 2> SkTB
litterAllocator; | 55 typedef SkSmallAllocator<3, sizeof(SkBitmapProcShader) + sizeof(void*) * 2> SkTB
litterAllocator; |
56 | 56 |
57 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and
MUST outlive | 57 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and
MUST outlive |
58 // the SkShader. | 58 // the SkShader. |
59 SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::
TileMode, | 59 SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::
TileMode, |
60 SkTBlitterAllocator* alloc); | 60 SkTBlitterAllocator* alloc); |
61 | 61 |
62 #endif | 62 #endif |
OLD | NEW |