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

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

Issue 39973004: Minor changes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkBitmapAlphaThresholdShader.cpp ('k') | no next file » | 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 "GrTexture.h" 10 #include "GrTexture.h"
(...skipping 24 matching lines...) Expand all
35 this->fRefCnt = 1; // restore ref count to initial setting 35 this->fRefCnt = 1; // restore ref count to initial setting
36 36
37 nonConstThis->resetFlag((GrTextureFlags) kReturnToCache_FlagBit); 37 nonConstThis->resetFlag((GrTextureFlags) kReturnToCache_FlagBit);
38 nonConstThis->INHERITED::getContext()->addExistingTextureToCache(nonCons tThis); 38 nonConstThis->INHERITED::getContext()->addExistingTextureToCache(nonCons tThis);
39 39
40 // Note: "this" texture might be freed inside addExistingTextureToCache 40 // Note: "this" texture might be freed inside addExistingTextureToCache
41 // if it is purged. 41 // if it is purged.
42 return; 42 return;
43 } 43 }
44 44
45 SkASSERT(0 == this->getDeferredRefCount());
45 this->INHERITED::internal_dispose(); 46 this->INHERITED::internal_dispose();
46 } 47 }
47 48
48 bool GrTexture::readPixels(int left, int top, int width, int height, 49 bool GrTexture::readPixels(int left, int top, int width, int height,
49 GrPixelConfig config, void* buffer, 50 GrPixelConfig config, void* buffer,
50 size_t rowBytes, uint32_t pixelOpsFlags) { 51 size_t rowBytes, uint32_t pixelOpsFlags) {
51 // go through context so that all necessary flushing occurs 52 // go through context so that all necessary flushing occurs
52 GrContext* context = this->getContext(); 53 GrContext* context = this->getContext();
53 if (NULL == context) { 54 if (NULL == context) {
54 return false; 55 return false;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return GrResourceKey(cacheID, texture_resource_type(), 0); 188 return GrResourceKey(cacheID, texture_resource_type(), 0);
188 } 189 }
189 190
190 bool GrTexture::NeedsResizing(const GrResourceKey& key) { 191 bool GrTexture::NeedsResizing(const GrResourceKey& key) {
191 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); 192 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag);
192 } 193 }
193 194
194 bool GrTexture::NeedsBilerp(const GrResourceKey& key) { 195 bool GrTexture::NeedsBilerp(const GrResourceKey& key) {
195 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); 196 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag);
196 } 197 }
OLDNEW
« no previous file with comments | « src/effects/SkBitmapAlphaThresholdShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698