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

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

Issue 2180503002: Add destination color space to AsFPArgs. Eliminates last XFORMTODO. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/constcolorprocessor.cpp ('k') | src/core/SkBitmapProcShader.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 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 }; 309 };
310 310
311 virtual bool asACompose(ComposeRec*) const { return false; } 311 virtual bool asACompose(ComposeRec*) const { return false; }
312 312
313 #if SK_SUPPORT_GPU 313 #if SK_SUPPORT_GPU
314 struct AsFPArgs { 314 struct AsFPArgs {
315 AsFPArgs(GrContext* context, 315 AsFPArgs(GrContext* context,
316 const SkMatrix* viewMatrix, 316 const SkMatrix* viewMatrix,
317 const SkMatrix* localMatrix, 317 const SkMatrix* localMatrix,
318 SkFilterQuality filterQuality, 318 SkFilterQuality filterQuality,
319 SkColorSpace* dstColorSpace,
319 SkSourceGammaTreatment gammaTreatment) 320 SkSourceGammaTreatment gammaTreatment)
320 : fContext(context) 321 : fContext(context)
321 , fViewMatrix(viewMatrix) 322 , fViewMatrix(viewMatrix)
322 , fLocalMatrix(localMatrix) 323 , fLocalMatrix(localMatrix)
323 , fFilterQuality(filterQuality) 324 , fFilterQuality(filterQuality)
325 , fDstColorSpace(dstColorSpace)
324 , fGammaTreatment(gammaTreatment) {} 326 , fGammaTreatment(gammaTreatment) {}
325 327
326 GrContext* fContext; 328 GrContext* fContext;
327 const SkMatrix* fViewMatrix; 329 const SkMatrix* fViewMatrix;
328 const SkMatrix* fLocalMatrix; 330 const SkMatrix* fLocalMatrix;
329 SkFilterQuality fFilterQuality; 331 SkFilterQuality fFilterQuality;
332 SkColorSpace* fDstColorSpace;
330 SkSourceGammaTreatment fGammaTreatment; 333 SkSourceGammaTreatment fGammaTreatment;
331 }; 334 };
332 335
333 /** 336 /**
334 * Returns a GrFragmentProcessor that implements the shader for the GPU bac kend. NULL is 337 * Returns a GrFragmentProcessor that implements the shader for the GPU bac kend. NULL is
335 * returned if there is no GPU implementation. 338 * returned if there is no GPU implementation.
336 * 339 *
337 * The GPU device does not call SkShader::createContext(), instead we pass the view matrix, 340 * The GPU device does not call SkShader::createContext(), instead we pass the view matrix,
338 * local matrix, and filter quality directly. 341 * local matrix, and filter quality directly.
339 * 342 *
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 SkMatrix fLocalMatrix; 518 SkMatrix fLocalMatrix;
516 519
517 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 520 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
518 friend class SkLocalMatrixShader; 521 friend class SkLocalMatrixShader;
519 friend class SkBitmapProcShader; // for computeTotalInverse() 522 friend class SkBitmapProcShader; // for computeTotalInverse()
520 523
521 typedef SkFlattenable INHERITED; 524 typedef SkFlattenable INHERITED;
522 }; 525 };
523 526
524 #endif 527 #endif
OLDNEW
« no previous file with comments | « gm/constcolorprocessor.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698