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

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

Issue 1333383002: Move some of the adding stencil attachment logic of Gpu and into Render Target. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 void init(const GrSurfaceDesc&, const IDDesc&); 72 void init(const GrSurfaceDesc&, const IDDesc&);
73 73
74 void onAbandon() override; 74 void onAbandon() override;
75 void onRelease() override; 75 void onRelease() override;
76 76
77 // In protected because subclass GrGLTextureRenderTarget calls this version. 77 // In protected because subclass GrGLTextureRenderTarget calls this version.
78 size_t onGpuMemorySize() const override; 78 size_t onGpuMemorySize() const override;
79 79
80 private: 80 private:
81 GrGLGpu* getGLGpu() const;
82 bool completeStencilAttachment() override;
83
81 GrGLuint fRTFBOID; 84 GrGLuint fRTFBOID;
82 GrGLuint fTexFBOID; 85 GrGLuint fTexFBOID;
83 GrGLuint fMSColorRenderbufferID; 86 GrGLuint fMSColorRenderbufferID;
84 87
85 // We track this separately from GrGpuResource because this may be both a te xture and a render 88 // We track this separately from GrGpuResource because this may be both a te xture and a render
86 // target, and the texture may be wrapped while the render target is not. 89 // target, and the texture may be wrapped while the render target is not.
87 LifeCycle fRTLifecycle; 90 LifeCycle fRTLifecycle;
88 91
89 // when we switch to this render target we want to set the viewport to 92 // when we switch to this render target we want to set the viewport to
90 // only render to content area (as opposed to the whole allocation) and 93 // only render to content area (as opposed to the whole allocation) and
91 // we want the rendering to be at top left (GL has origin in bottom left) 94 // we want the rendering to be at top left (GL has origin in bottom left)
92 GrGLIRect fViewport; 95 GrGLIRect fViewport;
93 96
94 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However , abandon and 97 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However , abandon and
95 // release zero out the IDs and the cache needs to know the size even after those actions. 98 // release zero out the IDs and the cache needs to know the size even after those actions.
96 size_t fGpuMemorySize; 99 size_t fGpuMemorySize;
97 100
98 typedef GrRenderTarget INHERITED; 101 typedef GrRenderTarget INHERITED;
99 }; 102 };
100 103
101 #endif 104 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698