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

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

Issue 855473002: initial preroll api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 private: 50 private:
51 SkBitmapProcState* fState; 51 SkBitmapProcState* fState;
52 uint32_t fFlags; 52 uint32_t fFlags;
53 53
54 typedef SkShader::Context INHERITED; 54 typedef SkShader::Context INHERITED;
55 }; 55 };
56 56
57 protected: 57 protected:
58 void flatten(SkWriteBuffer&) const SK_OVERRIDE; 58 void flatten(SkWriteBuffer&) const SK_OVERRIDE;
59 Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE ; 59 Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE ;
60 void onPreroll() const SK_OVERRIDE;
60 61
61 SkBitmap fRawBitmap; // experimental for RLE encoding 62 SkBitmap fRawBitmap; // experimental for RLE encoding
62 uint8_t fTileModeX, fTileModeY; 63 uint8_t fTileModeX, fTileModeY;
63 64
64 private: 65 private:
65 typedef SkShader INHERITED; 66 typedef SkShader INHERITED;
66 }; 67 };
67 68
68 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total 69 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total
69 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of 70 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of
70 // an Sk3DBlitter in SkDraw.cpp 71 // an Sk3DBlitter in SkDraw.cpp
71 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not 72 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not
72 // yet found a situation where the size below isn't big enough. 73 // yet found a situation where the size below isn't big enough.
73 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator; 74 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator;
74 75
75 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive 76 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive
76 // the SkShader. 77 // the SkShader.
77 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader ::TileMode, 78 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader ::TileMode,
78 const SkMatrix* localMatrix, SkTBlitterAllocator* alloc); 79 const SkMatrix* localMatrix, SkTBlitterAllocator* alloc);
79 80
80 #endif 81 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698