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

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

Issue 1709753002: Mark existing image filter entry points that will be going away with Deprecated (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 4 years, 10 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/effects/SkXfermodeImageFilter.cpp ('k') | src/gpu/SkGpuDevice.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 2014 Google Inc. 2 * Copyright 2014 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 "GrLayerCache.h" 8 #include "GrLayerCache.h"
9 #include "GrLayerHoister.h" 9 #include "GrLayerHoister.h"
10 #include "GrRecordReplaceDraw.h" 10 #include "GrRecordReplaceDraw.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // This cache is transient, and is freed (along with all its contained 301 // This cache is transient, and is freed (along with all its contained
302 // textures) when it goes out of scope. 302 // textures) when it goes out of scope.
303 SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kDefau ltCacheSize)); 303 SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kDefau ltCacheSize));
304 SkImageFilter::Context filterContext(totMat, clipBounds, cache); 304 SkImageFilter::Context filterContext(totMat, clipBounds, cache);
305 305
306 SkImageFilter::DeviceProxy proxy(device); 306 SkImageFilter::DeviceProxy proxy(device);
307 SkBitmap src; 307 SkBitmap src;
308 GrWrapTextureInBitmap(layer->texture(), layer->texture()->width(), layer->te xture()->height(), 308 GrWrapTextureInBitmap(layer->texture(), layer->texture()->width(), layer->te xture()->height(),
309 false, &src); 309 false, &src);
310 310
311 if (!layer->filter()->filterImage(&proxy, src, filterContext, &filteredBitma p, &offset)) { 311 if (!layer->filter()->filterImageDeprecated(&proxy, src, filterContext,
312 &filteredBitmap, &offset)) {
312 // Filtering failed. Press on with the unfiltered version. 313 // Filtering failed. Press on with the unfiltered version.
313 return; 314 return;
314 } 315 }
315 316
316 SkIRect newRect = SkIRect::MakeWH(filteredBitmap.width(), filteredBitmap.hei ght()); 317 SkIRect newRect = SkIRect::MakeWH(filteredBitmap.width(), filteredBitmap.hei ght());
317 layer->setTexture(filteredBitmap.getTexture(), newRect, false); 318 layer->setTexture(filteredBitmap.getTexture(), newRect, false);
318 layer->setOffset(offset); 319 layer->setOffset(offset);
319 } 320 }
320 321
321 void GrLayerHoister::DrawLayers(GrContext* context, const SkTDArray<GrHoistedLay er>& layers) { 322 void GrLayerHoister::DrawLayers(GrContext* context, const SkTDArray<GrHoistedLay er>& layers) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 #if !GR_CACHE_HOISTED_LAYERS 385 #if !GR_CACHE_HOISTED_LAYERS
385 386
386 // This code completely clears out the atlas. It is required when 387 // This code completely clears out the atlas. It is required when
387 // caching is disabled so the atlas doesn't fill up and force more 388 // caching is disabled so the atlas doesn't fill up and force more
388 // free floating layers 389 // free floating layers
389 layerCache->purgeAll(); 390 layerCache->purgeAll();
390 #endif 391 #endif
391 392
392 layerCache->end(); 393 layerCache->end();
393 } 394 }
OLDNEW
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698