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

Side by Side Diff: include/gpu/GrSurface.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/GrResource.h ('k') | include/gpu/GrTexture.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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #ifndef GrSurface_DEFINED 9 #ifndef GrSurface_DEFINED
10 #define GrSurface_DEFINED 10 #define GrSurface_DEFINED
11 11
12 #include "GrTypes.h" 12 #include "GrTypes.h"
13 #include "GrResource.h" 13 #include "GrGpuObject.h"
14 #include "SkRect.h" 14 #include "SkRect.h"
15 15
16 class GrTexture; 16 class GrTexture;
17 class GrRenderTarget; 17 class GrRenderTarget;
18 struct SkImageInfo; 18 struct SkImageInfo;
19 19
20 class GrSurface : public GrResource { 20 class GrSurface : public GrGpuObject {
21 public: 21 public:
22 SK_DECLARE_INST_COUNT(GrSurface); 22 SK_DECLARE_INST_COUNT(GrSurface);
23 23
24 /** 24 /**
25 * Retrieves the width of the surface. 25 * Retrieves the width of the surface.
26 * 26 *
27 * @return the width in texels 27 * @return the width in texels
28 */ 28 */
29 int width() const { return fDesc.fWidth; } 29 int width() const { return fDesc.fWidth; }
30 30
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 protected: 138 protected:
139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
140 : INHERITED(gpu, isWrapped) 140 : INHERITED(gpu, isWrapped)
141 , fDesc(desc) { 141 , fDesc(desc) {
142 } 142 }
143 143
144 GrTextureDesc fDesc; 144 GrTextureDesc fDesc;
145 145
146 private: 146 private:
147 typedef GrResource INHERITED; 147 typedef GrGpuObject INHERITED;
148 }; 148 };
149 149
150 #endif // GrSurface_DEFINED 150 #endif // GrSurface_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrResource.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698