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

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

Issue 2091773002: Revert of Support GL_SAMPLES queries in null contexts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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/GrRenderBufferObj.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 /* 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 GrFBBindableObj_DEFINED 9 #ifndef GrFBBindableObj_DEFINED
10 #define GrFBBindableObj_DEFINED 10 #define GrFBBindableObj_DEFINED
11 11
12 #include "SkTDArray.h" 12 #include "SkTDArray.h"
13 #include "GrFakeRefObj.h" 13 #include "GrFakeRefObj.h"
14 14
15 //////////////////////////////////////////////////////////////////////////////// 15 ////////////////////////////////////////////////////////////////////////////////
16 // A common base class for render buffers and textures 16 // A common base class for render buffers and textures
17 class GrFBBindableObj : public GrFakeRefObj { 17 class GrFBBindableObj : public GrFakeRefObj {
18 18
19 public: 19 public:
20 GrFBBindableObj() 20 GrFBBindableObj()
21 : GrFakeRefObj() 21 : GrFakeRefObj() {
22 , fNumSamples(1) {
23 } 22 }
24 23
25 virtual ~GrFBBindableObj() { 24 virtual ~GrFBBindableObj() {
26 GrAlwaysAssert(0 == fColorReferees.count()); 25 GrAlwaysAssert(0 == fColorReferees.count());
27 GrAlwaysAssert(0 == fDepthReferees.count()); 26 GrAlwaysAssert(0 == fDepthReferees.count());
28 GrAlwaysAssert(0 == fStencilReferees.count()); 27 GrAlwaysAssert(0 == fStencilReferees.count());
29 } 28 }
30 29
31 void setColorBound(GrFakeRefObj *referee) { 30 void setColorBound(GrFakeRefObj *referee) {
32 fColorReferees.append(1, &referee); 31 fColorReferees.append(1, &referee);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 fStencilReferees.removeShuffle(index); 68 fStencilReferees.removeShuffle(index);
70 } 69 }
71 bool getStencilBound(GrFakeRefObj *referee) const { 70 bool getStencilBound(GrFakeRefObj *referee) const {
72 int index = fStencilReferees.find(referee); 71 int index = fStencilReferees.find(referee);
73 return 0 <= index; 72 return 0 <= index;
74 } 73 }
75 bool getStencilBound() const { 74 bool getStencilBound() const {
76 return 0 != fStencilReferees.count(); 75 return 0 != fStencilReferees.count();
77 } 76 }
78 77
79 int numSamples() { return fNumSamples; }
80 78
81 protected: 79 protected:
82 int fNumSamples;
83
84 private: 80 private:
85 SkTDArray<GrFakeRefObj *> fColorReferees; // frame buffers that use this a s a color buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D") 81 SkTDArray<GrFakeRefObj *> fColorReferees; // frame buffers that use this a s a color buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D")
86 SkTDArray<GrFakeRefObj *> fDepthReferees; // frame buffers that use this a s a depth buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D") 82 SkTDArray<GrFakeRefObj *> fDepthReferees; // frame buffers that use this a s a depth buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D")
87 SkTDArray<GrFakeRefObj *> fStencilReferees; // frame buffers that use this a s a stencil buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D") 83 SkTDArray<GrFakeRefObj *> fStencilReferees; // frame buffers that use this a s a stencil buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D")
88 84
89 typedef GrFakeRefObj INHERITED; 85 typedef GrFakeRefObj INHERITED;
90 }; 86 };
91 87
92 #endif // GrFBBindableObj_DEFINED 88 #endif // GrFBBindableObj_DEFINED
OLDNEW
« no previous file with comments | « tools/gpu/gl/debug/DebugGLTestContext.cpp ('k') | tools/gpu/gl/debug/GrRenderBufferObj.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698