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

Side by Side Diff: src/gpu/SkGpuDevice.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/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.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 2011 Google Inc. 2 * Copyright 2011 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 const SkMatrix& viewMatrix, 962 const SkMatrix& viewMatrix,
963 const SkRect& srcRect, 963 const SkRect& srcRect,
964 const SkIRect& clippedSrcIRect, 964 const SkIRect& clippedSrcIRect,
965 const GrTextureParams& params, 965 const GrTextureParams& params,
966 const SkPaint& origPaint, 966 const SkPaint& origPaint,
967 SkCanvas::SrcRectConstraint constraint, 967 SkCanvas::SrcRectConstraint constraint,
968 int tileSize, 968 int tileSize,
969 bool bicubic) { 969 bool bicubic) {
970 ASSERT_SINGLE_OWNER 970 ASSERT_SINGLE_OWNER
971 971
972 // This is the funnel for all paths that draw tiled bitmaps/images. Log hist ogram entry. 972 // This is the funnel for all paths that draw tiled bitmaps/images. Log hist ogram entries.
973 SK_HISTOGRAM_BOOLEAN("DrawTiled", true); 973 SK_HISTOGRAM_BOOLEAN("DrawTiled", true);
974 LogDrawScaleFactor(viewMatrix, origPaint.getFilterQuality());
974 975
975 // The following pixel lock is technically redundant, but it is desirable 976 // The following pixel lock is technically redundant, but it is desirable
976 // to lock outside of the tile loop to prevent redecoding the whole image 977 // to lock outside of the tile loop to prevent redecoding the whole image
977 // at each tile in cases where 'bitmap' holds an SkDiscardablePixelRef that 978 // at each tile in cases where 'bitmap' holds an SkDiscardablePixelRef that
978 // is larger than the limit of the discardable memory pool. 979 // is larger than the limit of the discardable memory pool.
979 SkAutoLockPixels alp(bitmap); 980 SkAutoLockPixels alp(bitmap);
980 981
981 const SkPaint* paint = &origPaint; 982 const SkPaint* paint = &origPaint;
982 SkPaint tempPaint; 983 SkPaint tempPaint;
983 if (origPaint.isAntiAlias() && !fRenderTarget->isUnifiedMultisampled()) { 984 if (origPaint.isAntiAlias() && !fRenderTarget->isUnifiedMultisampled()) {
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 } 1943 }
1943 1944
1944 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1945 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1945 ASSERT_SINGLE_OWNER 1946 ASSERT_SINGLE_OWNER
1946 // We always return a transient cache, so it is freed after each 1947 // We always return a transient cache, so it is freed after each
1947 // filter traversal. 1948 // filter traversal.
1948 return SkGpuDevice::NewImageFilterCache(); 1949 return SkGpuDevice::NewImageFilterCache();
1949 } 1950 }
1950 1951
1951 #endif 1952 #endif
OLDNEW
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698