| 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 "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 // where the original path can in fact be modified in place (even though | 778 // where the original path can in fact be modified in place (even though |
| 779 // its parameter type is const). | 779 // its parameter type is const). |
| 780 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath); | 780 SkPath* pathPtr = const_cast<SkPath*>(&origSrcPath); |
| 781 SkTLazy<SkPath> tmpPath; | 781 SkTLazy<SkPath> tmpPath; |
| 782 SkTLazy<SkPath> effectPath; | 782 SkTLazy<SkPath> effectPath; |
| 783 SkPathEffect* pathEffect = paint.getPathEffect(); | 783 SkPathEffect* pathEffect = paint.getPathEffect(); |
| 784 | 784 |
| 785 SkMatrix viewMatrix = origViewMatrix; | 785 SkMatrix viewMatrix = origViewMatrix; |
| 786 | 786 |
| 787 if (prePathMatrix) { | 787 if (prePathMatrix) { |
| 788 // stroking and path effects are supposed to be applied *after* the preP
athMatrix. | 788 // stroking, path effects, and blurs are supposed to be applied *after*
the prePathMatrix. |
| 789 // The pre-path-matrix also should not affect shadeing. | 789 // The pre-path-matrix also should not affect shading. |
| 790 if (NULL == pathEffect && NULL == paint.getShader() && | 790 if (NULL == paint.getMaskFilter() && NULL == pathEffect && NULL == paint
.getShader() && |
| 791 (strokeInfo.getStrokeRec().isFillStyle() || | 791 (strokeInfo.getStrokeRec().isFillStyle() || |
| 792 strokeInfo.getStrokeRec().isHairlineStyle())) { | 792 strokeInfo.getStrokeRec().isHairlineStyle())) { |
| 793 viewMatrix.preConcat(*prePathMatrix); | 793 viewMatrix.preConcat(*prePathMatrix); |
| 794 } else { | 794 } else { |
| 795 SkPath* result = pathPtr; | 795 SkPath* result = pathPtr; |
| 796 | 796 |
| 797 if (!pathIsMutable) { | 797 if (!pathIsMutable) { |
| 798 result = tmpPath.init(); | 798 result = tmpPath.init(); |
| 799 result->setIsVolatile(true); | 799 result->setIsVolatile(true); |
| 800 pathIsMutable = true; | 800 pathIsMutable = true; |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 #endif | 2057 #endif |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 2060 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 2061 // We always return a transient cache, so it is freed after each | 2061 // We always return a transient cache, so it is freed after each |
| 2062 // filter traversal. | 2062 // filter traversal. |
| 2063 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 2063 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 2064 } | 2064 } |
| 2065 | 2065 |
| 2066 #endif | 2066 #endif |
| OLD | NEW |