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

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

Issue 1514503004: SkBitmap move (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 17:55:13 EST Created 5 years 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 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(new SkGrPixelRef(result.info(), texture))->unref(); 285 result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref();
286 return result; 286 return skstd::move(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
296 static const int kDefaultCacheSize = 32 * 1024 * 1024; 296 static const int kDefaultCacheSize = 32 * 1024 * 1024;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 #if !GR_CACHE_HOISTED_LAYERS 392 #if !GR_CACHE_HOISTED_LAYERS
393 393
394 // This code completely clears out the atlas. It is required when 394 // This code completely clears out the atlas. It is required when
395 // caching is disabled so the atlas doesn't fill up and force more 395 // caching is disabled so the atlas doesn't fill up and force more
396 // free floating layers 396 // free floating layers
397 layerCache->purgeAll(); 397 layerCache->purgeAll();
398 #endif 398 #endif
399 399
400 layerCache->end(); 400 layerCache->end();
401 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698