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

Side by Side Diff: src/gpu/SkGpuDevice_drawTexture.cpp

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 | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/SkGr.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 2015 Google Inc. 2 * Copyright 2015 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 #include "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 ? SkSourceGammaTreatment::kRespect : SkSourceGammaTreatment::kIgnore; 206 ? SkSourceGammaTreatment::kRespect : SkSourceGammaTreatment::kIgnore;
207 sk_sp<GrFragmentProcessor> fp(producer->createFragmentProcessor( 207 sk_sp<GrFragmentProcessor> fp(producer->createFragmentProcessor(
208 *textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode, 208 *textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode,
209 fDrawContext->getColorSpace(), gammaTreatment)); 209 fDrawContext->getColorSpace(), gammaTreatment));
210 if (!fp) { 210 if (!fp) {
211 return; 211 return;
212 } 212 }
213 213
214 GrPaint grPaint; 214 GrPaint grPaint;
215 if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer-> isAlphaOnly(), 215 if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer-> isAlphaOnly(),
216 gammaCorrect, &grPaint)) { 216 gammaCorrect, fDrawContext->getColorSpace() , &grPaint)) {
217 return; 217 return;
218 } 218 }
219 219
220 if (canUseTextureCoordsAsLocalCoords) { 220 if (canUseTextureCoordsAsLocalCoords) {
221 fDrawContext->fillRectToRect(clip, grPaint, viewMatrix, clippedDstRect, clippedSrcRect); 221 fDrawContext->fillRectToRect(clip, grPaint, viewMatrix, clippedDstRect, clippedSrcRect);
222 return; 222 return;
223 } 223 }
224 224
225 if (!mf) { 225 if (!mf) {
226 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect); 226 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect);
(...skipping 13 matching lines...) Expand all
240 rrect)) { 240 rrect)) {
241 return; 241 return;
242 } 242 }
243 SkPath rectPath; 243 SkPath rectPath;
244 rectPath.addRect(clippedDstRect); 244 rectPath.addRect(clippedDstRect);
245 rectPath.setIsVolatile(true); 245 rectPath.setIsVolatile(true);
246 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl ip, 246 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl ip,
247 rectPath, &grPaint, viewMatrix, mf, GrSt yle::SimpleFill(), 247 rectPath, &grPaint, viewMatrix, mf, GrSt yle::SimpleFill(),
248 true); 248 true);
249 } 249 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698