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

Side by Side Diff: include/core/SkShader.h

Issue 278963002: add localmatrix parameter to shader's asNewEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « no previous file | 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 8
9 #ifndef SkShader_DEFINED 9 #ifndef SkShader_DEFINED
10 #define SkShader_DEFINED 10 #define SkShader_DEFINED
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 virtual GradientType asAGradient(GradientInfo* info) const; 354 virtual GradientType asAGradient(GradientInfo* info) const;
355 355
356 /** 356 /**
357 * If the shader subclass has a GrEffect implementation, this resturns the effect to install. 357 * If the shader subclass has a GrEffect implementation, this resturns the effect to install.
358 * The incoming color to the effect has r=g=b=a all extracted from the SkPa int's alpha. 358 * The incoming color to the effect has r=g=b=a all extracted from the SkPa int's alpha.
359 * The output color should be the computed SkShader premul color modulated by the incoming 359 * The output color should be the computed SkShader premul color modulated by the incoming
360 * color. The GrContext may be used by the effect to create textures. The G PU device does not 360 * color. The GrContext may be used by the effect to create textures. The G PU device does not
361 * call createContext. Instead we pass the SkPaint here in case the shader needs paint info. 361 * call createContext. Instead we pass the SkPaint here in case the shader needs paint info.
362 */ 362 */
363 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c onst; 363 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint,
364 const SkMatrix* localMatrixOrNull) const;
364 365
365 ////////////////////////////////////////////////////////////////////////// 366 //////////////////////////////////////////////////////////////////////////
366 // Factory methods for stock shaders 367 // Factory methods for stock shaders
367 368
368 /** 369 /**
369 * Call this to create a new "empty" shader, that will not draw anything. 370 * Call this to create a new "empty" shader, that will not draw anything.
370 */ 371 */
371 static SkShader* CreateEmptyShader(); 372 static SkShader* CreateEmptyShader();
372 373
373 /** Call this to create a new shader that will draw with the specified bitma p. 374 /** Call this to create a new shader that will draw with the specified bitma p.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 */ 434 */
434 virtual Context* onCreateContext(const ContextRec&, void* storage) const; 435 virtual Context* onCreateContext(const ContextRec&, void* storage) const;
435 436
436 private: 437 private:
437 SkMatrix fLocalMatrix; 438 SkMatrix fLocalMatrix;
438 439
439 typedef SkFlattenable INHERITED; 440 typedef SkFlattenable INHERITED;
440 }; 441 };
441 442
442 #endif 443 #endif
OLDNEW
« no previous file with comments | « no previous file | include/effects/SkPerlinNoiseShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698