| 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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 } | 1388 } |
| 1389 } | 1389 } |
| 1390 | 1390 |
| 1391 bool SkGpuDevice::filterTexture(GrContext* context, GrTexture* texture, | 1391 bool SkGpuDevice::filterTexture(GrContext* context, GrTexture* texture, |
| 1392 int width, int height, | 1392 int width, int height, |
| 1393 const SkImageFilter* filter, | 1393 const SkImageFilter* filter, |
| 1394 const SkImageFilter::Context& ctx, | 1394 const SkImageFilter::Context& ctx, |
| 1395 SkBitmap* result, SkIPoint* offset) { | 1395 SkBitmap* result, SkIPoint* offset) { |
| 1396 SkASSERT(filter); | 1396 SkASSERT(filter); |
| 1397 | 1397 |
| 1398 SkImageFilter::Proxy proxy(this); | 1398 SkImageFilter::DeviceProxy proxy(this); |
| 1399 | 1399 |
| 1400 if (filter->canFilterImageGPU()) { | 1400 if (filter->canFilterImageGPU()) { |
| 1401 return filter->filterImageGPU(&proxy, wrap_texture(texture, width, heigh
t), | 1401 return filter->filterImageGPU(&proxy, wrap_texture(texture, width, heigh
t), |
| 1402 ctx, result, offset); | 1402 ctx, result, offset); |
| 1403 } else { | 1403 } else { |
| 1404 return false; | 1404 return false; |
| 1405 } | 1405 } |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, | 1408 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2026 #endif | 2026 #endif |
| 2027 } | 2027 } |
| 2028 | 2028 |
| 2029 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 2029 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 2030 // We always return a transient cache, so it is freed after each | 2030 // We always return a transient cache, so it is freed after each |
| 2031 // filter traversal. | 2031 // filter traversal. |
| 2032 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 2032 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 2033 } | 2033 } |
| 2034 | 2034 |
| 2035 #endif | 2035 #endif |
| OLD | NEW |