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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 1390913005: add applyFilter() to SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase to new effect factories, use stroke to show image bounds 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/image/SkImage.cpp » ('j') | src/image/SkImage_Gpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698