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

Side by Side Diff: src/core/SkImageCacherator.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/core/SkFontDescriptor.h ('k') | src/core/SkLightingShader.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 2015 Google Inc. 2 * Copyright 2015 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkImage_Base.h" 10 #include "SkImage_Base.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (*subset != bounds) { 48 if (*subset != bounds) {
49 // we need a different uniqueID since we really are a subset of the raw generator 49 // we need a different uniqueID since we really are a subset of the raw generator
50 uniqueID = SkNextID::ImageID(); 50 uniqueID = SkNextID::ImageID();
51 } 51 }
52 } else { 52 } else {
53 subset = &bounds; 53 subset = &bounds;
54 } 54 }
55 55
56 // Now that we know we can hand-off the generator (to be owned by the cacher ator) we can 56 // Now that we know we can hand-off the generator (to be owned by the cacher ator) we can
57 // release our holder. (we DONT want to delete it here anymore) 57 // release our holder. (we DONT want to delete it here anymore)
58 genHolder.detach(); 58 genHolder.release();
59 59
60 return new SkImageCacherator(gen, gen->getInfo().makeWH(subset->width(), sub set->height()), 60 return new SkImageCacherator(gen, gen->getInfo().makeWH(subset->width(), sub set->height()),
61 SkIPoint::Make(subset->x(), subset->y()), uniqu eID); 61 SkIPoint::Make(subset->x(), subset->y()), uniqu eID);
62 } 62 }
63 63
64 SkImageCacherator::SkImageCacherator(SkImageGenerator* gen, const SkImageInfo& i nfo, 64 SkImageCacherator::SkImageCacherator(SkImageGenerator* gen, const SkImageInfo& i nfo,
65 const SkIPoint& origin, uint32_t uniqueID) 65 const SkIPoint& origin, uint32_t uniqueID)
66 : fNotThreadSafeGenerator(gen) 66 : fNotThreadSafeGenerator(gen)
67 , fInfo(info) 67 , fInfo(info)
68 , fOrigin(origin) 68 , fOrigin(origin)
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 #else 334 #else
335 335
336 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 336 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
337 const SkImage* client, SkImage::Cach ingHint) { 337 const SkImage* client, SkImage::Cach ingHint) {
338 return nullptr; 338 return nullptr;
339 } 339 }
340 340
341 #endif 341 #endif
OLDNEW
« no previous file with comments | « src/core/SkFontDescriptor.h ('k') | src/core/SkLightingShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698