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

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

Issue 1421493003: tunnel down texture-size-constraint to imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: re-export include/gpu to clients of core.gyp Created 5 years, 2 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
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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, 675 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
676 const SkPaint& paint, const SkMatrix* prePathMatrix, 676 const SkPaint& paint, const SkMatrix* prePathMatrix,
677 bool pathIsMutable) { 677 bool pathIsMutable) {
678 CHECK_FOR_ANNOTATION(paint); 678 CHECK_FOR_ANNOTATION(paint);
679 CHECK_SHOULD_DRAW(draw); 679 CHECK_SHOULD_DRAW(draw);
680 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawPath", fContext); 680 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawPath", fContext);
681 681
682 GrBlurUtils::drawPathWithMaskFilter(fContext, fDrawContext, fRenderTarget, 682 GrBlurUtils::drawPathWithMaskFilter(fContext, fDrawContext, fRenderTarget,
683 fClip, origSrcPath, paint, 683 fClip, origSrcPath, paint,
684 *draw.fMatrix, prePathMatrix, 684 *draw.fMatrix, prePathMatrix,
685 draw.fClip->getBounds(), pathIsMutable); 685 draw.fClip->getBounds(), pathIsMutable,
686 GrTextureProvider::kApprox_SizeConstrain t);
686 } 687 }
687 688
688 static const int kBmpSmallTileSize = 1 << 10; 689 static const int kBmpSmallTileSize = 1 << 10;
689 690
690 static inline int get_tile_count(const SkIRect& srcRect, int tileSize) { 691 static inline int get_tile_count(const SkIRect& srcRect, int tileSize) {
691 int tilesX = (srcRect.fRight / tileSize) - (srcRect.fLeft / tileSize) + 1; 692 int tilesX = (srcRect.fRight / tileSize) - (srcRect.fLeft / tileSize) + 1;
692 int tilesY = (srcRect.fBottom / tileSize) - (srcRect.fTop / tileSize) + 1; 693 int tilesY = (srcRect.fBottom / tileSize) - (srcRect.fTop / tileSize) + 1;
693 return tilesX * tilesY; 694 return tilesX * tilesY;
694 } 695 }
695 696
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2020 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2020 } 2021 }
2021 2022
2022 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2023 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2023 // We always return a transient cache, so it is freed after each 2024 // We always return a transient cache, so it is freed after each
2024 // filter traversal. 2025 // filter traversal.
2025 return SkGpuDevice::NewImageFilterCache(); 2026 return SkGpuDevice::NewImageFilterCache();
2026 } 2027 }
2027 2028
2028 #endif 2029 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698