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

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

Issue 263293005: add local-matrix to shader::context (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add/fix comments Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkPictureShader.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPictureShader_DEFINED 8 #ifndef SkPictureShader_DEFINED
9 #define SkPictureShader_DEFINED 9 #define SkPictureShader_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 #endif 34 #endif
35 35
36 protected: 36 protected:
37 SkPictureShader(SkReadBuffer&); 37 SkPictureShader(SkReadBuffer&);
38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
39 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 39 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
40 40
41 private: 41 private:
42 SkPictureShader(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL); 42 SkPictureShader(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL);
43 43
44 SkShader* refBitmapShader(const SkMatrix&) const; 44 SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix) cons t;
45 45
46 SkPicture* fPicture; 46 SkPicture* fPicture;
47 TileMode fTmx, fTmy; 47 TileMode fTmx, fTmy;
48 48
49 mutable SkMutex fCachedBitmapShaderMutex; 49 mutable SkMutex fCachedBitmapShaderMutex;
50 mutable SkAutoTUnref<SkShader> fCachedBitmapShader; 50 mutable SkAutoTUnref<SkShader> fCachedBitmapShader;
51 mutable SkSize fCachedTileScale; 51 mutable SkSize fCachedTileScale;
52 mutable SkMatrix fCachedLocalMatrix; 52 mutable SkMatrix fCachedLocalMatrix;
53 53
54 class PictureShaderContext : public SkShader::Context { 54 class PictureShaderContext : public SkShader::Context {
(...skipping 16 matching lines...) Expand all
71 SkShader::Context* fBitmapShaderContext; 71 SkShader::Context* fBitmapShaderContext;
72 void* fBitmapShaderContextStorage; 72 void* fBitmapShaderContextStorage;
73 73
74 typedef SkShader::Context INHERITED; 74 typedef SkShader::Context INHERITED;
75 }; 75 };
76 76
77 typedef SkShader INHERITED; 77 typedef SkShader INHERITED;
78 }; 78 };
79 79
80 #endif // SkPictureShader_DEFINED 80 #endif // SkPictureShader_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698