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

Side by Side Diff: tools/gpu/gl/debug/GrFrameBufferObj.h

Issue 2085553004: Don't track FB depth attachment in debug GL context (Closed) Base URL: https://skia.googlesource.com/skia.git@fix_testing
Patch Set: Created 4 years, 6 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
« no previous file with comments | « tools/gpu/gl/debug/DebugGLTestContext.cpp ('k') | tools/gpu/gl/debug/GrFrameBufferObj.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 2012 Google Inc. 3 * Copyright 2012 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 GrFrameBufferObj_DEFINED 9 #ifndef GrFrameBufferObj_DEFINED
10 #define GrFrameBufferObj_DEFINED 10 #define GrFrameBufferObj_DEFINED
11 11
12 #include "GrFakeRefObj.h" 12 #include "GrFakeRefObj.h"
13 class GrFBBindableObj; 13 class GrFBBindableObj;
14 14
15 //////////////////////////////////////////////////////////////////////////////// 15 ////////////////////////////////////////////////////////////////////////////////
16 // TODO: when a framebuffer obj is bound the GL_SAMPLES query must return 0 16 // TODO: when a framebuffer obj is bound the GL_SAMPLES query must return 0
17 // TODO: GL_STENCIL_BITS must also be redirected to the framebuffer 17 // TODO: GL_STENCIL_BITS must also be redirected to the framebuffer
18 class GrFrameBufferObj : public GrFakeRefObj { 18 class GrFrameBufferObj : public GrFakeRefObj {
19 GR_DEFINE_CREATOR(GrFrameBufferObj); 19 GR_DEFINE_CREATOR(GrFrameBufferObj);
20 20
21 public: 21 public:
22 GrFrameBufferObj() 22 GrFrameBufferObj()
23 : GrFakeRefObj() 23 : GrFakeRefObj()
24 , fBound(false) 24 , fBound(false)
25 , fColorBuffer(nullptr) 25 , fColorBuffer(nullptr)
26 , fDepthBuffer(nullptr)
27 , fStencilBuffer(nullptr) { 26 , fStencilBuffer(nullptr) {
28 } 27 }
29 28
30 virtual ~GrFrameBufferObj() { 29 virtual ~GrFrameBufferObj() {
31 fColorBuffer = nullptr; 30 fColorBuffer = nullptr;
32 fDepthBuffer = nullptr;
33 fStencilBuffer = nullptr; 31 fStencilBuffer = nullptr;
34 } 32 }
35 33
36 void setBound() { fBound = true; } 34 void setBound() { fBound = true; }
37 void resetBound() { fBound = false; } 35 void resetBound() { fBound = false; }
38 bool getBound() const { return fBound; } 36 bool getBound() const { return fBound; }
39 37
40 void setColor(GrFBBindableObj *buffer); 38 void setColor(GrFBBindableObj *buffer);
41 GrFBBindableObj *getColor() { return fColorBuffer; } 39 GrFBBindableObj *getColor() { return fColorBuffer; }
42 40
43 void setDepth(GrFBBindableObj *buffer);
44 GrFBBindableObj *getDepth() { return fDepthBuffer; }
45
46 void setStencil(GrFBBindableObj *buffer); 41 void setStencil(GrFBBindableObj *buffer);
47 GrFBBindableObj *getStencil() { return fStencilBuffer; } 42 GrFBBindableObj *getStencil() { return fStencilBuffer; }
48 43
49 void deleteAction() override { 44 void deleteAction() override {
50 45
51 setColor(nullptr); 46 setColor(nullptr);
52 setDepth(nullptr);
53 setStencil(nullptr); 47 setStencil(nullptr);
54 48
55 this->INHERITED::deleteAction(); 49 this->INHERITED::deleteAction();
56 } 50 }
57 51
58 protected: 52 protected:
59 private: 53 private:
60 bool fBound; // is this frame buffer currently bound via "glBindFrame buffer"? 54 bool fBound; // is this frame buffer currently bound via "glBindFrame buffer"?
61 GrFBBindableObj * fColorBuffer; 55 GrFBBindableObj * fColorBuffer;
62 GrFBBindableObj * fDepthBuffer;
63 GrFBBindableObj * fStencilBuffer; 56 GrFBBindableObj * fStencilBuffer;
64 57
65 typedef GrFakeRefObj INHERITED; 58 typedef GrFakeRefObj INHERITED;
66 }; 59 };
67 60
68 #endif // GrFrameBufferObj_DEFINED 61 #endif // GrFrameBufferObj_DEFINED
OLDNEW
« no previous file with comments | « tools/gpu/gl/debug/DebugGLTestContext.cpp ('k') | tools/gpu/gl/debug/GrFrameBufferObj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698