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

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

Issue 1735423002: Revert of Skia Filter Quality and Scaling Metrics (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
143 this->drawTextureProducerImpl(producer, clippedSrcRect, clippedDstRect, cons traint, viewMatrix, 140 this->drawTextureProducerImpl(producer, clippedSrcRect, clippedDstRect, cons traint, viewMatrix,
144 srcToDstMatrix, clip, paint); 141 srcToDstMatrix, clip, paint);
145 } 142 }
146 143
147 void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer, 144 void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
148 const SkRect& clippedSrcRect, 145 const SkRect& clippedSrcRect,
149 const SkRect& clippedDstRect, 146 const SkRect& clippedDstRect,
150 SkCanvas::SrcRectConstraint constraint , 147 SkCanvas::SrcRectConstraint constraint ,
151 const SkMatrix& viewMatrix, 148 const SkMatrix& viewMatrix,
152 const SkMatrix& srcToDstMatrix, 149 const SkMatrix& srcToDstMatrix,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 rrect)) { 233 rrect)) {
237 return; 234 return;
238 } 235 }
239 SkPath rectPath; 236 SkPath rectPath;
240 rectPath.addRect(clippedDstRect); 237 rectPath.addRect(clippedDstRect);
241 rectPath.setIsVolatile(true); 238 rectPath.setIsVolatile(true);
242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip, 239 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext, fClip,
243 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(), 240 rectPath, &grPaint, viewMatrix, mf, pain t.getPathEffect(),
244 GrStrokeInfo::FillInfo(), true); 241 GrStrokeInfo::FillInfo(), true);
245 } 242 }
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