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

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

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) Created 5 years, 3 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 | « include/gpu/effects/GrExtractAlphaFragmentProcessor.h ('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 11 matching lines...) Expand all
22 22
23 // overrides from SkShader 23 // overrides from SkShader
24 bool isOpaque() const override; 24 bool isOpaque() const override;
25 BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const override; 25 BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const override;
26 26
27 size_t contextSize() const override; 27 size_t contextSize() const override;
28 28
29 SK_TO_STRING_OVERRIDE() 29 SK_TO_STRING_OVERRIDE()
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader)
31 31
32 32 #if SK_SUPPORT_GPU
33 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, 33 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v iewM,
34 GrColor*, GrProcessorDataManager*, 34 const SkMatrix*, SkFilterQual ity,
35 GrFragmentProcessor**) const override; 35 GrProcessorDataManager*) cons t override;
36 #endif
36 37
37 class BitmapProcShaderContext : public SkShader::Context { 38 class BitmapProcShaderContext : public SkShader::Context {
38 public: 39 public:
39 // The context takes ownership of the state. It will call its destructor 40 // The context takes ownership of the state. It will call its destructor
40 // but will NOT free the memory. 41 // but will NOT free the memory.
41 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*); 42 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*);
42 ~BitmapProcShaderContext() override; 43 ~BitmapProcShaderContext() override;
43 44
44 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; 45 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
45 ShadeProc asAShadeProc(void** ctx) override; 46 ShadeProc asAShadeProc(void** ctx) override;
(...skipping 25 matching lines...) Expand all
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, 1152> SkTBlitterAllocator; 74 typedef SkSmallAllocator<3, 1152> SkTBlitterAllocator;
74 75
75 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd MUST outlive 76 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd 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 | « include/gpu/effects/GrExtractAlphaFragmentProcessor.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698