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

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

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 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/GrSoftwarePathRenderer.h ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 if (this->texturePriv().hasMipMaps()) { 48 if (this->texturePriv().hasMipMaps()) {
49 // We don't have to worry about the mipmaps being a different size than 49 // We don't have to worry about the mipmaps being a different size than
50 // we'd expect because we never change fDesc.fWidth/fHeight. 50 // we'd expect because we never change fDesc.fWidth/fHeight.
51 textureSize *= 2; 51 textureSize *= 2;
52 } 52 }
53 return textureSize; 53 return textureSize;
54 } 54 }
55 55
56
57 void GrTexture::onRelease() { 56 void GrTexture::onRelease() {
58 SkASSERT(!this->texturePriv().isSetFlag((GrTextureFlags) kReturnToCache_Flag Bit)); 57 SkASSERT(!this->texturePriv().isSetFlag((GrTextureFlags) kReturnToCache_Flag Bit));
59 INHERITED::onRelease(); 58 INHERITED::onRelease();
60 } 59 }
61 60
62 void GrTexture::onAbandon() { 61 void GrTexture::onAbandon() {
63 if (fRenderTarget.get()) { 62 if (fRenderTarget.get()) {
64 fRenderTarget->abandon(); 63 fRenderTarget->abandon();
65 } 64 }
66 INHERITED::onAbandon(); 65 INHERITED::onAbandon();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return GrResourceKey(cacheID, ResourceType(), 0); 175 return GrResourceKey(cacheID, ResourceType(), 0);
177 } 176 }
178 177
179 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) { 178 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) {
180 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); 179 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag);
181 } 180 }
182 181
183 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) { 182 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) {
184 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); 183 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag);
185 } 184 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698