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

Side by Side Diff: src/gpu/gl/GrGLRenderTarget.h

Issue 729683002: Make GrResourceCache2 responsible for calling release, abandon, and ~. (Closed) Base URL: https://skia.googlesource.com/skia.git@revrev
Patch Set: tiny cleanup Created 6 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
« no previous file with comments | « src/gpu/gl/GrGLPathRange.cpp ('k') | src/gpu/gl/GrGLStencilBuffer.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 8
9 #ifndef GrGLRenderTarget_DEFINED 9 #ifndef GrGLRenderTarget_DEFINED
10 #define GrGLRenderTarget_DEFINED 10 #define GrGLRenderTarget_DEFINED
(...skipping 12 matching lines...) Expand all
23 23
24 struct IDDesc { 24 struct IDDesc {
25 GrGLuint fRTFBOID; 25 GrGLuint fRTFBOID;
26 GrGLuint fTexFBOID; 26 GrGLuint fTexFBOID;
27 GrGLuint fMSColorRenderbufferID; 27 GrGLuint fMSColorRenderbufferID;
28 bool fIsWrapped; 28 bool fIsWrapped;
29 }; 29 };
30 30
31 GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&); 31 GrGLRenderTarget(GrGpuGL*, const GrSurfaceDesc&, const IDDesc&);
32 32
33 virtual ~GrGLRenderTarget() { this->release(); }
34
35 void setViewport(const GrGLIRect& rect) { fViewport = rect; } 33 void setViewport(const GrGLIRect& rect) { fViewport = rect; }
36 const GrGLIRect& getViewport() const { return fViewport; } 34 const GrGLIRect& getViewport() const { return fViewport; }
37 35
38 // The following two functions return the same ID when a 36 // The following two functions return the same ID when a
39 // texture/render target is multisampled, and different IDs when 37 // texture/render target is multisampled, and different IDs when
40 // it is. 38 // it is.
41 // FBO ID used to render into 39 // FBO ID used to render into
42 GrGLuint renderFBOID() const { return fRTFBOID; } 40 GrGLuint renderFBOID() const { return fRTFBOID; }
43 // FBO ID that has texture ID attached. 41 // FBO ID that has texture ID attached.
44 GrGLuint textureFBOID() const { return fTexFBOID; } 42 GrGLuint textureFBOID() const { return fTexFBOID; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 83
86 // onGpuMemorySize() needs to know what how many color values are owned per pixel. However, 84 // onGpuMemorySize() needs to know what how many color values are owned per pixel. However,
87 // abandon and release zero out the IDs and the cache needs to know the size even after those 85 // abandon and release zero out the IDs and the cache needs to know the size even after those
88 // actions. 86 // actions.
89 uint8_t fColorValuesPerPixel; 87 uint8_t fColorValuesPerPixel;
90 88
91 typedef GrRenderTarget INHERITED; 89 typedef GrRenderTarget INHERITED;
92 }; 90 };
93 91
94 #endif 92 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRange.cpp ('k') | src/gpu/gl/GrGLStencilBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698