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

Side by Side Diff: include/gpu/GrTexture.h

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrBufferAllocPool.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 #ifndef GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 fMipMapsDirty = mipMapsDirty; 48 fMipMapsDirty = mipMapsDirty;
49 } 49 }
50 50
51 bool mipMapsAreDirty() const { 51 bool mipMapsAreDirty() const {
52 return fMipMapsDirty; 52 return fMipMapsDirty;
53 } 53 }
54 54
55 /** 55 /**
56 * Approximate number of bytes used by the texture 56 * Approximate number of bytes used by the texture
57 */ 57 */
58 virtual size_t sizeInBytes() const SK_OVERRIDE { 58 virtual size_t gpuMemorySize() const SK_OVERRIDE {
59 return (size_t) fDesc.fWidth * 59 return (size_t) fDesc.fWidth *
60 fDesc.fHeight * 60 fDesc.fHeight *
61 GrBytesPerPixel(fDesc.fConfig); 61 GrBytesPerPixel(fDesc.fConfig);
62 } 62 }
63 63
64 // GrSurface overrides 64 // GrSurface overrides
65 virtual bool readPixels(int left, int top, int width, int height, 65 virtual bool readPixels(int left, int top, int width, int height,
66 GrPixelConfig config, 66 GrPixelConfig config,
67 void* buffer, 67 void* buffer,
68 size_t rowBytes = 0, 68 size_t rowBytes = 0,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GrTexture* setTexture(GrTexture* texture) { 203 GrTexture* setTexture(GrTexture* texture) {
204 fTexture.reset(SkSafeRef(texture)); 204 fTexture.reset(SkSafeRef(texture));
205 return texture; 205 return texture;
206 } 206 }
207 private: 207 private:
208 SkAutoTUnref<GrTexture> fTexture; 208 SkAutoTUnref<GrTexture> fTexture;
209 SkIPoint fOffset; 209 SkIPoint fOffset;
210 }; 210 };
211 211
212 #endif 212 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrBufferAllocPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698