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

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

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix 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 | « include/gpu/SkGr.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 13 matching lines...) Expand all
24 virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERR IDE; 24 virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERR IDE;
25 25
26 virtual size_t contextSize() const SK_OVERRIDE; 26 virtual size_t contextSize() const SK_OVERRIDE;
27 27
28 static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty); 28 static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty);
29 29
30 SK_TO_STRING_OVERRIDE() 30 SK_TO_STRING_OVERRIDE()
31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader)
32 32
33 33
34 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix*, GrColo r*, 34 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*,
35 GrFragmentProcessor**) 35 GrColor*, GrFragmentProcessor**) const SK_OVERRIDE;
36 const SK_OVERRIDE;
37 36
38 class BitmapProcShaderContext : public SkShader::Context { 37 class BitmapProcShaderContext : public SkShader::Context {
39 public: 38 public:
40 // The context takes ownership of the state. It will call its destructor 39 // The context takes ownership of the state. It will call its destructor
41 // but will NOT free the memory. 40 // but will NOT free the memory.
42 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*); 41 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*);
43 virtual ~BitmapProcShaderContext(); 42 virtual ~BitmapProcShaderContext();
44 43
45 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE; 44 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE;
46 virtual ShadeProc asAShadeProc(void** ctx) SK_OVERRIDE; 45 virtual ShadeProc asAShadeProc(void** ctx) SK_OVERRIDE;
(...skipping 25 matching lines...) Expand all
72 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not 71 // 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. 72 // yet found a situation where the size below isn't big enough.
74 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator; 73 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator;
75 74
76 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive 75 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive
77 // the SkShader. 76 // the SkShader.
78 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader ::TileMode, 77 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader ::TileMode,
79 const SkMatrix* localMatrix, SkTBlitterAllocator* alloc); 78 const SkMatrix* localMatrix, SkTBlitterAllocator* alloc);
80 79
81 #endif 80 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698