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

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

Issue 1201983006: Clean up usage of SkSurfaceProps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/gpu/GrLayerHoister.cpp ('k') | src/utils/SkDeferredCanvas.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 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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 paintRect); 1222 paintRect);
1223 } 1223 }
1224 1224
1225 bool SkGpuDevice::filterTexture(GrContext* context, GrTexture* texture, 1225 bool SkGpuDevice::filterTexture(GrContext* context, GrTexture* texture,
1226 int width, int height, 1226 int width, int height,
1227 const SkImageFilter* filter, 1227 const SkImageFilter* filter,
1228 const SkImageFilter::Context& ctx, 1228 const SkImageFilter::Context& ctx,
1229 SkBitmap* result, SkIPoint* offset) { 1229 SkBitmap* result, SkIPoint* offset) {
1230 SkASSERT(filter); 1230 SkASSERT(filter);
1231 1231
1232 // FIXME: plumb actual surface props such that we don't have to lie about th e flags here 1232 SkImageFilter::Proxy proxy(this);
1233 // (https://code.google.com/p/skia/issues/detail?id=3148).
1234 SkImageFilter::Proxy proxy(this, SkSurfaceProps(0, this->surfaceProps().pixe lGeometry()));
1235 1233
1236 if (filter->canFilterImageGPU()) { 1234 if (filter->canFilterImageGPU()) {
1237 return filter->filterImageGPU(&proxy, wrap_texture(texture, width, heigh t), 1235 return filter->filterImageGPU(&proxy, wrap_texture(texture, width, heigh t),
1238 ctx, result, offset); 1236 ctx, result, offset);
1239 } else { 1237 } else {
1240 return false; 1238 return false;
1241 } 1239 }
1242 } 1240 }
1243 1241
1244 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, 1242 void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 #endif 1767 #endif
1770 } 1768 }
1771 1769
1772 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1770 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1773 // We always return a transient cache, so it is freed after each 1771 // We always return a transient cache, so it is freed after each
1774 // filter traversal. 1772 // filter traversal.
1775 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1773 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1776 } 1774 }
1777 1775
1778 #endif 1776 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698