| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
| 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 "SkImageFilter.h" | 8 #include "SkImageFilter.h" |
| 9 | 9 |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // loop, but then return false on the next filter. | 359 // loop, but then return false on the next filter. |
| 360 *dst = bounds; | 360 *dst = bounds; |
| 361 return true; | 361 return true; |
| 362 } | 362 } |
| 363 | 363 |
| 364 bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const
SkMatrix&, | 364 bool SkImageFilter::asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const
SkMatrix&, |
| 365 const SkIRect&) const { | 365 const SkIRect&) const { |
| 366 return false; | 366 return false; |
| 367 } | 367 } |
| 368 | 368 |
| 369 bool SkImageFilter::asColorFilter(SkColorFilter**) const { | |
| 370 return false; | |
| 371 } | |
| 372 | |
| 373 #if SK_SUPPORT_GPU | 369 #if SK_SUPPORT_GPU |
| 374 | 370 |
| 375 void SkImageFilter::WrapTexture(GrTexture* texture, int width, int height, SkBit
map* result) { | 371 void SkImageFilter::WrapTexture(GrTexture* texture, int width, int height, SkBit
map* result) { |
| 376 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); | 372 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); |
| 377 result->setInfo(info); | 373 result->setInfo(info); |
| 378 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); | 374 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); |
| 379 } | 375 } |
| 380 | 376 |
| 381 bool SkImageFilter::getInputResultGPU(SkImageFilter::Proxy* proxy, | 377 bool SkImageFilter::getInputResultGPU(SkImageFilter::Proxy* proxy, |
| 382 const SkBitmap& src, const Context& ctx, | 378 const SkBitmap& src, const Context& ctx, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 485 |
| 490 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) { | 486 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) { |
| 491 return SkNEW_ARGS(CacheImpl, (maxBytes)); | 487 return SkNEW_ARGS(CacheImpl, (maxBytes)); |
| 492 } | 488 } |
| 493 | 489 |
| 494 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache); | 490 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache); |
| 495 | 491 |
| 496 SkImageFilter::Cache* SkImageFilter::Cache::Get() { | 492 SkImageFilter::Cache* SkImageFilter::Cache::Get() { |
| 497 return cache.get(); | 493 return cache.get(); |
| 498 } | 494 } |
| OLD | NEW |