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

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

Issue 1686203002: Skia Filter Quality and Scaling Metrics (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: feedback 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
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 clippedDstRect = *dstRect; 130 clippedDstRect = *dstRect;
131 if (!srcToDstMatrix.setRectToRect(srcBounds, *dstRect, SkMatrix::kFi ll_ScaleToFit)) { 131 if (!srcToDstMatrix.setRectToRect(srcBounds, *dstRect, SkMatrix::kFi ll_ScaleToFit)) {
132 return; 132 return;
133 } 133 }
134 } else { 134 } else {
135 clippedDstRect = srcBounds; 135 clippedDstRect = srcBounds;
136 srcToDstMatrix.reset(); 136 srcToDstMatrix.reset();
137 } 137 }
138 } 138 }
139 139
140 // Now that we have both the view and srcToDst matrices, log our scale facto r.
141 LogDrawScaleFactor(SkMatrix::Concat(viewMatrix, srcToDstMatrix), paint.getFi lterQuality());
142
140 this->drawTextureProducerImpl(producer, clippedSrcRect, clippedDstRect, cons traint, viewMatrix, 143 this->drawTextureProducerImpl(producer, clippedSrcRect, clippedDstRect, cons traint, viewMatrix,
141 srcToDstMatrix, clip, paint); 144 srcToDstMatrix, clip, paint);
142 } 145 }
143 146
144 void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer, 147 void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
145 const SkRect& clippedSrcRect, 148 const SkRect& clippedSrcRect,
146 const SkRect& clippedDstRect, 149 const SkRect& clippedDstRect,
147 SkCanvas::SrcRectConstraint constraint , 150 SkCanvas::SrcRectConstraint constraint ,
148 const SkMatrix& viewMatrix, 151 const SkMatrix& viewMatrix,
149 const SkMatrix& srcToDstMatrix, 152 const SkMatrix& srcToDstMatrix,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 rrect)) { 236 rrect)) {
234 return; 237 return;
235 } 238 }
236 SkPath rectPath; 239 SkPath rectPath;
237 rectPath.addRect(clippedDstRect); 240 rectPath.addRect(clippedDstRect);
238 rectPath.setIsVolatile(true); 241 rectPath.setIsVolatile(true);
239 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip, 242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip,
240 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(), 243 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(),
241 GrStrokeInfo::FillInfo(), true); 244 GrStrokeInfo::FillInfo(), true);
242 } 245 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698