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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 const SkImageFilter::Context& ctx, | 1122 const SkImageFilter::Context& ctx, |
1123 SkBitmap* result, SkIPoint* offset) { | 1123 SkBitmap* result, SkIPoint* offset) { |
1124 ASSERT_SINGLE_OWNER | 1124 ASSERT_SINGLE_OWNER |
1125 SkASSERT(filter); | 1125 SkASSERT(filter); |
1126 | 1126 |
1127 SkImageFilter::DeviceProxy proxy(this); | 1127 SkImageFilter::DeviceProxy proxy(this); |
1128 | 1128 |
1129 if (filter->canFilterImageGPU()) { | 1129 if (filter->canFilterImageGPU()) { |
1130 SkBitmap bm; | 1130 SkBitmap bm; |
1131 GrWrapTextureInBitmap(texture, width, height, false, &bm); | 1131 GrWrapTextureInBitmap(texture, width, height, false, &bm); |
1132 return filter->filterImageGPU(&proxy, bm, ctx, result, offset); | 1132 return filter->filterImageGPUDeprecated(&proxy, bm, ctx, result, offset)
; |
1133 } else { | 1133 } else { |
1134 return false; | 1134 return false; |
1135 } | 1135 } |
1136 } | 1136 } |
1137 | 1137 |
1138 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, | 1138 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
1139 int left, int top, const SkPaint& paint) { | 1139 int left, int top, const SkPaint& paint) { |
1140 ASSERT_SINGLE_OWNER | 1140 ASSERT_SINGLE_OWNER |
1141 // drawSprite is defined to be in device coords. | 1141 // drawSprite is defined to be in device coords. |
1142 CHECK_SHOULD_DRAW(draw); | 1142 CHECK_SHOULD_DRAW(draw); |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 } | 1890 } |
1891 | 1891 |
1892 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1892 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1893 ASSERT_SINGLE_OWNER | 1893 ASSERT_SINGLE_OWNER |
1894 // We always return a transient cache, so it is freed after each | 1894 // We always return a transient cache, so it is freed after each |
1895 // filter traversal. | 1895 // filter traversal. |
1896 return SkGpuDevice::NewImageFilterCache(); | 1896 return SkGpuDevice::NewImageFilterCache(); |
1897 } | 1897 } |
1898 | 1898 |
1899 #endif | 1899 #endif |
OLD | NEW |