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

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

Issue 1404433002: Remove image usage type enum. Use GrTextureParams instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no gpu build Created 5 years, 2 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 | « src/core/SkImageCacherator.cpp ('k') | src/core/SkImageGenerator.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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 if (this->canFilterImageGPU()) { 458 if (this->canFilterImageGPU()) {
459 return this->filterImageGPU(proxy, src, ctx, result, offset); 459 return this->filterImageGPU(proxy, src, ctx, result, offset);
460 } else { 460 } else {
461 if (this->filterImage(proxy, src, ctx, result, offset)) { 461 if (this->filterImage(proxy, src, ctx, result, offset)) {
462 if (!result->getTexture()) { 462 if (!result->getTexture()) {
463 const SkImageInfo info = result->info(); 463 const SkImageInfo info = result->info();
464 if (kUnknown_SkColorType == info.colorType()) { 464 if (kUnknown_SkColorType == info.colorType()) {
465 return false; 465 return false;
466 } 466 }
467 SkAutoTUnref<GrTexture> resultTex(GrRefCachedBitmapTexture(conte xt, *result, nullptr)); 467 SkAutoTUnref<GrTexture> resultTex(
468 GrRefCachedBitmapTexture(context, *result,GrTextureParams::C lampNoFilter()));
468 result->setPixelRef(new SkGrPixelRef(info, resultTex))->unref(); 469 result->setPixelRef(new SkGrPixelRef(info, resultTex))->unref();
469 } 470 }
470 return true; 471 return true;
471 } else { 472 } else {
472 return false; 473 return false;
473 } 474 }
474 } 475 }
475 } 476 }
476 #endif 477 #endif
477 478
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 591 }
591 return dev; 592 return dev;
592 } 593 }
593 594
594 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src, 595 bool SkImageFilter::Proxy::filterImage(const SkImageFilter* filter, const SkBitm ap& src,
595 const SkImageFilter::Context& ctx, 596 const SkImageFilter::Context& ctx,
596 SkBitmap* result, SkIPoint* offset) { 597 SkBitmap* result, SkIPoint* offset) {
597 return fDevice->filterImage(filter, src, ctx, result, offset); 598 return fDevice->filterImage(filter, src, ctx, result, offset);
598 } 599 }
599 600
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698