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

Side by Side Diff: include/gpu/GrRenderTarget.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/GrGpuObject.h ('k') | include/gpu/GrResource.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef GrRenderTarget_DEFINED 8 #ifndef GrRenderTarget_DEFINED
9 #define GrRenderTarget_DEFINED 9 #define GrRenderTarget_DEFINED
10 10
11 #include "GrSurface.h" 11 #include "GrSurface.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 13
14 class GrStencilBuffer; 14 class GrStencilBuffer;
15 class GrTexture; 15 class GrTexture;
16 16
17 /** 17 /**
18 * GrRenderTarget represents a 2D buffer of pixels that can be rendered to. 18 * GrRenderTarget represents a 2D buffer of pixels that can be rendered to.
19 * A context's render target is set by setRenderTarget(). Render targets are 19 * A context's render target is set by setRenderTarget(). Render targets are
20 * created by a createTexture with the kRenderTarget_TextureFlag flag. 20 * created by a createTexture with the kRenderTarget_TextureFlag flag.
21 * Additionally, GrContext provides methods for creating GrRenderTargets 21 * Additionally, GrContext provides methods for creating GrRenderTargets
22 * that wrap externally created render targets. 22 * that wrap externally created render targets.
23 */ 23 */
24 class GrRenderTarget : public GrSurface { 24 class GrRenderTarget : public GrSurface {
25 public: 25 public:
26 SK_DECLARE_INST_COUNT(GrRenderTarget) 26 SK_DECLARE_INST_COUNT(GrRenderTarget)
27 27
28 // GrResource overrides 28 // GrResource overrides
29 virtual size_t sizeInBytes() const SK_OVERRIDE; 29 virtual size_t gpuMemorySize() const SK_OVERRIDE;
30 30
31 // GrSurface overrides 31 // GrSurface overrides
32 /** 32 /**
33 * @return the texture associated with the render target, may be NULL. 33 * @return the texture associated with the render target, may be NULL.
34 */ 34 */
35 virtual GrTexture* asTexture() SK_OVERRIDE { return fTexture; } 35 virtual GrTexture* asTexture() SK_OVERRIDE { return fTexture; }
36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; } 36 virtual const GrTexture* asTexture() const SK_OVERRIDE { return fTexture; }
37 37
38 /** 38 /**
39 * @return this render target. 39 * @return this render target.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 GrStencilBuffer* fStencilBuffer; 169 GrStencilBuffer* fStencilBuffer;
170 GrTexture* fTexture; // not ref'ed 170 GrTexture* fTexture; // not ref'ed
171 171
172 SkIRect fResolveRect; 172 SkIRect fResolveRect;
173 173
174 typedef GrSurface INHERITED; 174 typedef GrSurface INHERITED;
175 }; 175 };
176 176
177 #endif 177 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrGpuObject.h ('k') | include/gpu/GrResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698