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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/GrLayerCache.cpp ('k') | src/gpu/GrNonAtomicRef.h » ('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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 atlasCanvas->flush(); 276 atlasCanvas->flush();
277 } 277 }
278 } 278 }
279 279
280 SkBitmap wrap_texture(GrTexture* texture) { 280 SkBitmap wrap_texture(GrTexture* texture) {
281 SkASSERT(texture); 281 SkASSERT(texture);
282 282
283 SkBitmap result; 283 SkBitmap result;
284 result.setInfo(texture->surfacePriv().info(kPremul_SkAlphaType)); 284 result.setInfo(texture->surfacePriv().info(kPremul_SkAlphaType));
285 result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (result.info(), texture)))->unre f(); 285 result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref();
286 return result; 286 return result;
287 } 287 }
288 288
289 void GrLayerHoister::FilterLayer(GrContext* context, 289 void GrLayerHoister::FilterLayer(GrContext* context,
290 SkGpuDevice* device, 290 SkGpuDevice* device,
291 const GrHoistedLayer& info) { 291 const GrHoistedLayer& info) {
292 GrCachedLayer* layer = info.fLayer; 292 GrCachedLayer* layer = info.fLayer;
293 293
294 SkASSERT(layer->filter()); 294 SkASSERT(layer->filter());
295 295
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void GrLayerHoister::PurgeCache(GrContext* context) { 383 void GrLayerHoister::PurgeCache(GrContext* context) {
384 #if !GR_CACHE_HOISTED_LAYERS 384 #if !GR_CACHE_HOISTED_LAYERS
385 GrLayerCache* layerCache = context->getLayerCache(); 385 GrLayerCache* layerCache = context->getLayerCache();
386 386
387 // This code completely clears out the atlas. It is required when 387 // This code completely clears out the atlas. It is required when
388 // 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
389 // free floating layers 389 // free floating layers
390 layerCache->purgeAll(); 390 layerCache->purgeAll();
391 #endif 391 #endif
392 } 392 }
OLDNEW
« no previous file with comments | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrNonAtomicRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698