OLD | NEW |
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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 const SkMatrix& viewMatrix, | 919 const SkMatrix& viewMatrix, |
920 const SkRect& srcRect, | 920 const SkRect& srcRect, |
921 const SkIRect& clippedSrcIRect, | 921 const SkIRect& clippedSrcIRect, |
922 const GrTextureParams& params, | 922 const GrTextureParams& params, |
923 const SkPaint& origPaint, | 923 const SkPaint& origPaint, |
924 SkCanvas::SrcRectConstraint constraint, | 924 SkCanvas::SrcRectConstraint constraint, |
925 int tileSize, | 925 int tileSize, |
926 bool bicubic) { | 926 bool bicubic) { |
927 ASSERT_SINGLE_OWNER | 927 ASSERT_SINGLE_OWNER |
928 | 928 |
929 // This is the funnel for all paths that draw tiled bitmaps/images. Log hist
ogram entry. | 929 // This is the funnel for all paths that draw tiled bitmaps/images. Log hist
ogram entries. |
930 SK_HISTOGRAM_BOOLEAN("DrawTiled", true); | 930 SK_HISTOGRAM_BOOLEAN("DrawTiled", true); |
| 931 LogDrawScaleFactor(viewMatrix, origPaint.getFilterQuality()); |
931 | 932 |
932 // The following pixel lock is technically redundant, but it is desirable | 933 // The following pixel lock is technically redundant, but it is desirable |
933 // to lock outside of the tile loop to prevent redecoding the whole image | 934 // to lock outside of the tile loop to prevent redecoding the whole image |
934 // at each tile in cases where 'bitmap' holds an SkDiscardablePixelRef that | 935 // at each tile in cases where 'bitmap' holds an SkDiscardablePixelRef that |
935 // is larger than the limit of the discardable memory pool. | 936 // is larger than the limit of the discardable memory pool. |
936 SkAutoLockPixels alp(bitmap); | 937 SkAutoLockPixels alp(bitmap); |
937 | 938 |
938 const SkPaint* paint = &origPaint; | 939 const SkPaint* paint = &origPaint; |
939 SkPaint tempPaint; | 940 SkPaint tempPaint; |
940 if (origPaint.isAntiAlias() && !fRenderTarget->isUnifiedMultisampled()) { | 941 if (origPaint.isAntiAlias() && !fRenderTarget->isUnifiedMultisampled()) { |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 } | 1891 } |
1891 | 1892 |
1892 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1893 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1893 ASSERT_SINGLE_OWNER | 1894 ASSERT_SINGLE_OWNER |
1894 // We always return a transient cache, so it is freed after each | 1895 // We always return a transient cache, so it is freed after each |
1895 // filter traversal. | 1896 // filter traversal. |
1896 return SkGpuDevice::NewImageFilterCache(); | 1897 return SkGpuDevice::NewImageFilterCache(); |
1897 } | 1898 } |
1898 | 1899 |
1899 #endif | 1900 #endif |
OLD | NEW |