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

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

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/GrYUVProvider.cpp ('k') | src/gpu/batches/GrDrawPathBatch.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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 if (shouldRetainContent) { 329 if (shouldRetainContent) {
330 if (fRenderTarget->wasDestroyed()) { 330 if (fRenderTarget->wasDestroyed()) {
331 return; 331 return;
332 } 332 }
333 this->context()->copySurface(newRT, fRenderTarget); 333 this->context()->copySurface(newRT, fRenderTarget);
334 } 334 }
335 335
336 SkASSERT(fRenderTarget != newRT); 336 SkASSERT(fRenderTarget != newRT);
337 337
338 fRenderTarget.reset(newRT.detach()); 338 fRenderTarget.reset(newRT.release());
339 339
340 #ifdef SK_DEBUG 340 #ifdef SK_DEBUG
341 SkImageInfo info = fRenderTarget->surfacePriv().info(fOpaque ? kOpaque_SkAlp haType : 341 SkImageInfo info = fRenderTarget->surfacePriv().info(fOpaque ? kOpaque_SkAlp haType :
342 kPremul_SkAlp haType); 342 kPremul_SkAlp haType);
343 SkASSERT(info == fLegacyBitmap.info()); 343 SkASSERT(info == fLegacyBitmap.info());
344 #endif 344 #endif
345 SkPixelRef* pr = new SkGrPixelRef(fLegacyBitmap.info(), fRenderTarget); 345 SkPixelRef* pr = new SkGrPixelRef(fLegacyBitmap.info(), fRenderTarget);
346 fLegacyBitmap.setPixelRef(pr)->unref(); 346 fLegacyBitmap.setPixelRef(pr)->unref();
347 347
348 fDrawContext.reset(this->context()->drawContext(fRenderTarget, &this->surfac eProps())); 348 fDrawContext.reset(this->context()->drawContext(fRenderTarget, &this->surfac eProps()));
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 } 1878 }
1879 1879
1880 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1880 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1881 ASSERT_SINGLE_OWNER 1881 ASSERT_SINGLE_OWNER
1882 // We always return a transient cache, so it is freed after each 1882 // We always return a transient cache, so it is freed after each
1883 // filter traversal. 1883 // filter traversal.
1884 return SkGpuDevice::NewImageFilterCache(); 1884 return SkGpuDevice::NewImageFilterCache();
1885 } 1885 }
1886 1886
1887 #endif 1887 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrYUVProvider.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698