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

Side by Side Diff: include/core/SkShader.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 | « gm/SkLinearBitmapPipelineGM.cpp ('k') | include/effects/SkPerlinNoiseShader.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 * Size of storage must be >= contextSize. 181 * Size of storage must be >= contextSize.
182 */ 182 */
183 Context* createContext(const ContextRec&, void* storage) const; 183 Context* createContext(const ContextRec&, void* storage) const;
184 184
185 /** 185 /**
186 * Return the size of a Context returned by createContext. 186 * Return the size of a Context returned by createContext.
187 * 187 *
188 * Override this if your subclass overrides createContext, to return the co rrect size of 188 * Override this if your subclass overrides createContext, to return the co rrect size of
189 * your subclass' context. 189 * your subclass' context.
190 */ 190 */
191 virtual size_t contextSize() const; 191 virtual size_t contextSize(const ContextRec&) const;
192 192
193 /** 193 /**
194 * Returns true if this shader is just a bitmap, and if not null, returns t he bitmap, 194 * Returns true if this shader is just a bitmap, and if not null, returns t he bitmap,
195 * localMatrix, and tilemodes. If this is not a bitmap, returns false and i gnores the 195 * localMatrix, and tilemodes. If this is not a bitmap, returns false and i gnores the
196 * out-parameters. 196 * out-parameters.
197 */ 197 */
198 bool isABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, TileMode xy[2]) co nst { 198 bool isABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, TileMode xy[2]) co nst {
199 return this->onIsABitmap(outTexture, outMatrix, xy); 199 return this->onIsABitmap(outTexture, outMatrix, xy);
200 } 200 }
201 201
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 SkMatrix fLocalMatrix; 426 SkMatrix fLocalMatrix;
427 427
428 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 428 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
429 friend class SkLocalMatrixShader; 429 friend class SkLocalMatrixShader;
430 friend class SkBitmapProcShader; // for computeTotalInverse() 430 friend class SkBitmapProcShader; // for computeTotalInverse()
431 431
432 typedef SkFlattenable INHERITED; 432 typedef SkFlattenable INHERITED;
433 }; 433 };
434 434
435 #endif 435 #endif
OLDNEW
« no previous file with comments | « gm/SkLinearBitmapPipelineGM.cpp ('k') | include/effects/SkPerlinNoiseShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698