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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 982933002: Use ComposColorFilter to collaps hierarchy (when possible). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unused parameter warning Created 5 years, 9 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
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698