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

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

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 textureMatrix = &tempMatrix; 199 textureMatrix = &tempMatrix;
200 } 200 }
201 SkAutoTUnref<const GrFragmentProcessor> fp(producer->createFragmentProcessor ( 201 SkAutoTUnref<const GrFragmentProcessor> fp(producer->createFragmentProcessor (
202 *textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode)); 202 *textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode));
203 if (!fp) { 203 if (!fp) {
204 return; 204 return;
205 } 205 }
206 206
207 GrPaint grPaint; 207 GrPaint grPaint;
208 if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer-> isAlphaOnly(), 208 if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer-> isAlphaOnly(),
209 &grPaint)) { 209 this->surfaceProps().allowSRGBInputs(), &gr Paint)) {
210 return; 210 return;
211 } 211 }
212 212
213 if (canUseTextureCoordsAsLocalCoords) { 213 if (canUseTextureCoordsAsLocalCoords) {
214 fDrawContext->fillRectToRect(clip, grPaint, viewMatrix, clippedDstRect, clippedSrcRect); 214 fDrawContext->fillRectToRect(clip, grPaint, viewMatrix, clippedDstRect, clippedSrcRect);
215 return; 215 return;
216 } 216 }
217 217
218 if (!mf) { 218 if (!mf) {
219 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect); 219 fDrawContext->drawRect(clip, grPaint, viewMatrix, clippedDstRect);
(...skipping 13 matching lines...) Expand all
233 rrect)) { 233 rrect)) {
234 return; 234 return;
235 } 235 }
236 SkPath rectPath; 236 SkPath rectPath;
237 rectPath.addRect(clippedDstRect); 237 rectPath.addRect(clippedDstRect);
238 rectPath.setIsVolatile(true); 238 rectPath.setIsVolatile(true);
239 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip, 239 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip,
240 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(), 240 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(),
241 GrStrokeInfo::FillInfo(), true); 241 GrStrokeInfo::FillInfo(), true);
242 } 242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698