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

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

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

Powered by Google App Engine
This is Rietveld 408576698