Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(945)

Side by Side Diff: src/core/SkBitmapProcShader.h

Issue 198193005: Work (in progress) to make SkShader immutable. (Closed) Base URL: https://skia.googlesource.com/skia.git@shaderGenerator
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBlitter.cpp » ('j') | src/core/SkShader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698