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

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

Issue 1720933002: Add ContextRec param to SkShader::contextSize() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: ContextRec plumbing only Created 4 years, 10 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 | « src/core/SkLocalMatrixShader.h ('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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
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 #ifndef SkPictureShader_DEFINED 9 #ifndef SkPictureShader_DEFINED
10 #define SkPictureShader_DEFINED 10 #define SkPictureShader_DEFINED
11 11
12 #include "SkShader.h" 12 #include "SkShader.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 class SkPicture; 15 class SkPicture;
16 16
17 /* 17 /*
18 * An SkPictureShader can be used to draw SkPicture-based patterns. 18 * An SkPictureShader can be used to draw SkPicture-based patterns.
19 * 19 *
20 * The SkPicture is first rendered into a tile, which is then used to shade the area according 20 * The SkPicture is first rendered into a tile, which is then used to shade the area according
21 * to specified tiling rules. 21 * to specified tiling rules.
22 */ 22 */
23 class SkPictureShader : public SkShader { 23 class SkPictureShader : public SkShader {
24 public: 24 public:
25 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix *, 25 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix *,
26 const SkRect*); 26 const SkRect*);
27 27
28 size_t contextSize() const override; 28 size_t contextSize(const ContextRec&) const override;
29 29
30 SK_TO_STRING_OVERRIDE() 30 SK_TO_STRING_OVERRIDE()
31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader) 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader)
32 32
33 #if SK_SUPPORT_GPU 33 #if SK_SUPPORT_GPU
34 const GrFragmentProcessor* asFragmentProcessor(GrContext*, 34 const GrFragmentProcessor* asFragmentProcessor(GrContext*,
35 const SkMatrix& viewM, 35 const SkMatrix& viewM,
36 const SkMatrix*, 36 const SkMatrix*,
37 SkFilterQuality) const overri de; 37 SkFilterQuality) const overri de;
38 #endif 38 #endif
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 SkShader::Context* fBitmapShaderContext; 70 SkShader::Context* fBitmapShaderContext;
71 void* fBitmapShaderContextStorage; 71 void* fBitmapShaderContextStorage;
72 72
73 typedef SkShader::Context INHERITED; 73 typedef SkShader::Context INHERITED;
74 }; 74 };
75 75
76 typedef SkShader INHERITED; 76 typedef SkShader INHERITED;
77 }; 77 };
78 78
79 #endif // SkPictureShader_DEFINED 79 #endif // SkPictureShader_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkLocalMatrixShader.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698