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

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

Issue 1101513004: SkPictureShader: scale down if width or height is larger than maxTextureSize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 GrColor*, GrFragmentProcessor**) const override; 34 GrColor*, GrFragmentProcessor**) const override;
35 35
36 protected: 36 protected:
37 SkPictureShader(SkReadBuffer&); 37 SkPictureShader(SkReadBuffer&);
38 void flatten(SkWriteBuffer&) const override; 38 void flatten(SkWriteBuffer&) const override;
39 Context* onCreateContext(const ContextRec&, void* storage) const override; 39 Context* onCreateContext(const ContextRec&, void* storage) const override;
40 40
41 private: 41 private:
42 SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const SkRect*); 42 SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const SkRect*);
43 43
44 SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix) cons t; 44 SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix, cons t int maxTextureSize = 0) const;
45 45
46 const SkPicture* fPicture; 46 const SkPicture* fPicture;
47 SkRect fTile; 47 SkRect fTile;
48 TileMode fTmx, fTmy; 48 TileMode fTmx, fTmy;
49 49
50 class PictureShaderContext : public SkShader::Context { 50 class PictureShaderContext : public SkShader::Context {
51 public: 51 public:
52 static Context* Create(void* storage, const SkPictureShader&, const Cont extRec&, 52 static Context* Create(void* storage, const SkPictureShader&, const Cont extRec&,
53 SkShader* bitmapShader); 53 SkShader* bitmapShader);
54 54
(...skipping 12 matching lines...) Expand all
67 SkShader::Context* fBitmapShaderContext; 67 SkShader::Context* fBitmapShaderContext;
68 void* fBitmapShaderContextStorage; 68 void* fBitmapShaderContextStorage;
69 69
70 typedef SkShader::Context INHERITED; 70 typedef SkShader::Context INHERITED;
71 }; 71 };
72 72
73 typedef SkShader INHERITED; 73 typedef SkShader INHERITED;
74 }; 74 };
75 75
76 #endif // SkPictureShader_DEFINED 76 #endif // SkPictureShader_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698