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

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

Issue 1982583002: Add isUnifiedMultisampled entry point to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // same happens for any mask filter that extends the bounds rendered in the dst. 179 // same happens for any mask filter that extends the bounds rendered in the dst.
180 // This is conservative as a mask filter does not have to expand the bounds rendered. 180 // This is conservative as a mask filter does not have to expand the bounds rendered.
181 bool coordsAllInsideSrcRect = !paint.isAntiAlias() && !mf; 181 bool coordsAllInsideSrcRect = !paint.isAntiAlias() && !mf;
182 182
183 // Check for optimization to drop the src rect constraint when on bilerp. 183 // Check for optimization to drop the src rect constraint when on bilerp.
184 if (filterMode && GrTextureParams::kBilerp_FilterMode == *filterMode && 184 if (filterMode && GrTextureParams::kBilerp_FilterMode == *filterMode &&
185 GrTextureAdjuster::kYes_FilterConstraint == constraintMode && coordsAllI nsideSrcRect) { 185 GrTextureAdjuster::kYes_FilterConstraint == constraintMode && coordsAllI nsideSrcRect) {
186 SkMatrix combinedMatrix; 186 SkMatrix combinedMatrix;
187 combinedMatrix.setConcat(viewMatrix, srcToDstMatrix); 187 combinedMatrix.setConcat(viewMatrix, srcToDstMatrix);
188 if (can_ignore_bilerp_constraint(*producer, clippedSrcRect, combinedMatr ix, 188 if (can_ignore_bilerp_constraint(*producer, clippedSrcRect, combinedMatr ix,
189 fRenderTarget->isUnifiedMultisampled()) ) { 189 fDrawContext->isUnifiedMultisampled())) {
190 constraintMode = GrTextureAdjuster::kNo_FilterConstraint; 190 constraintMode = GrTextureAdjuster::kNo_FilterConstraint;
191 } 191 }
192 } 192 }
193 193
194 const SkMatrix* textureMatrix; 194 const SkMatrix* textureMatrix;
195 SkMatrix tempMatrix; 195 SkMatrix tempMatrix;
196 if (canUseTextureCoordsAsLocalCoords) { 196 if (canUseTextureCoordsAsLocalCoords) {
197 textureMatrix = &SkMatrix::I(); 197 textureMatrix = &SkMatrix::I();
198 } else { 198 } else {
199 if (!srcToDstMatrix.invert(&tempMatrix)) { 199 if (!srcToDstMatrix.invert(&tempMatrix)) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 rrect)) { 236 rrect)) {
237 return; 237 return;
238 } 238 }
239 SkPath rectPath; 239 SkPath rectPath;
240 rectPath.addRect(clippedDstRect); 240 rectPath.addRect(clippedDstRect);
241 rectPath.setIsVolatile(true); 241 rectPath.setIsVolatile(true);
242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl ip, 242 GrBlurUtils::drawPathWithMaskFilter(this->context(), fDrawContext.get(), fCl ip,
243 rectPath, &grPaint, viewMatrix, mf, GrSt yle::SimpleFill(), 243 rectPath, &grPaint, viewMatrix, mf, GrSt yle::SimpleFill(),
244 true); 244 true);
245 } 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