aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-06-23 06:11:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-23 06:11:51 -0700
commit37feccb0bb858d7d970600ff97e48f540954fc6b (patch)
tree68b46c32884a703b1aabf4b86587dc799600a872 /tools
parente4a712b66571f80cf0f717ff51e3011a068363a0 (diff)
Revert of Support GL_SAMPLES queries in null contexts (patchset #4 id:60001 of https://codereview.chromium.org/2085043002/ )
Reason for revert: ASAN failures (including DEPS roll). Original issue's description: > Support GL_SAMPLES queries in null contexts > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085043002 > > Committed: https://skia.googlesource.com/skia/+/64b92a59294a2f73448b3fa8f36f39079f032521 > Committed: https://skia.googlesource.com/skia/+/57e98530c113066c4c2d9c64505c52dc25e66c00 TBR=bsalomon@google.com,csmartdalton@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2091773002
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/gl/debug/DebugGLTestContext.cpp79
-rw-r--r--tools/gpu/gl/debug/GrFBBindableObj.h6
-rw-r--r--tools/gpu/gl/debug/GrRenderBufferObj.h5
3 files changed, 3 insertions, 87 deletions
diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp
index cf8a9e4240..022d56a452 100644
--- a/tools/gpu/gl/debug/DebugGLTestContext.cpp
+++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp
@@ -373,34 +373,6 @@ public:
}
}
- GrGLvoid renderbufferStorage(GrGLenum target, GrGLenum internalformat, GrGLsizei width,
- GrGLsizei height) override {
- GrAlwaysAssert(GR_GL_RENDERBUFFER == target);
- GrRenderBufferObj* renderBuffer = this->getRenderBuffer();
- GrAlwaysAssert(renderBuffer);
- renderBuffer->setNumSamples(1);
- }
-
- GrGLvoid renderbufferStorageMultisample(GrGLenum target, GrGLsizei samples,
- GrGLenum internalformat, GrGLsizei width,
- GrGLsizei height) override {
- GrAlwaysAssert(GR_GL_RENDERBUFFER == target);
- GrRenderBufferObj* renderBuffer = this->getRenderBuffer();
- GrAlwaysAssert(renderBuffer);
- renderBuffer->setNumSamples(samples);
- }
-
- GrGLvoid namedRenderbufferStorage(GrGLuint renderbuffer, GrGLenum GrGLinternalformat,
- GrGLsizei width, GrGLsizei height) override {
- SK_ABORT("Not implemented");
- }
-
- GrGLvoid namedRenderbufferStorageMultisample(GrGLuint renderbuffer, GrGLsizei samples,
- GrGLenum GrGLinternalformat, GrGLsizei width,
- GrGLsizei height) override {
- SK_ABORT("Not implemented");
- }
-
GrGLvoid framebufferRenderbuffer(GrGLenum target,
GrGLenum attachment,
GrGLenum renderbuffertarget,
@@ -438,12 +410,6 @@ public:
}
- GrGLvoid namedFramebufferRenderbuffer(GrGLuint framebuffer, GrGLenum attachment,
- GrGLenum renderbuffertarget,
- GrGLuint renderbuffer) override {
- SK_ABORT("Not implemented");
- }
-
////////////////////////////////////////////////////////////////////////////////
GrGLvoid framebufferTexture2D(GrGLenum target, GrGLenum attachment, GrGLenum textarget,
GrGLuint textureID, GrGLint level) override {
@@ -484,30 +450,6 @@ public:
};
}
- GrGLvoid framebufferTexture2DMultisample(GrGLenum target, GrGLenum attachment,
- GrGLenum textarget, GrGLuint texture, GrGLint level,
- GrGLsizei samples) override {
- SK_ABORT("Not implemented");
- }
-
- GrGLvoid namedFramebufferTexture1D(GrGLuint framebuffer, GrGLenum attachment,
- GrGLenum textarget, GrGLuint texture,
- GrGLint level) override {
- SK_ABORT("Not implemented");
- }
-
- GrGLvoid namedFramebufferTexture2D(GrGLuint framebuffer, GrGLenum attachment,
- GrGLenum textarget, GrGLuint texture,
- GrGLint level) override {
- SK_ABORT("Not implemented");
- }
-
- GrGLvoid namedFramebufferTexture3D(GrGLuint framebuffer, GrGLenum attachment,
- GrGLenum textarget, GrGLuint texture, GrGLint level,
- GrGLint zoffset) override {
- SK_ABORT("Not implemented");
- }
-
GrGLuint createProgram() override {
GrProgramObj *program = CREATE(GrProgramObj, kProgram_ObjTypes);
@@ -588,26 +530,9 @@ public:
case GR_GL_STENCIL_BITS:
*params = 8;
break;
- case GR_GL_SAMPLES: {
- GrFrameBufferObj* framebuffer = this->getFrameBuffer();
- GrAlwaysAssert(framebuffer);
- int numSamples = 0;
-
- if (GrFBBindableObj* stencil = framebuffer->getStencil()) {
- numSamples = stencil->numSamples();
- }
- if (GrFBBindableObj* depth = framebuffer->getDepth()) {
- GrAlwaysAssert(!numSamples || numSamples == depth->numSamples());
- numSamples = depth->numSamples();
- }
- if (GrFBBindableObj* color = framebuffer->getColor()) {
- GrAlwaysAssert(!numSamples || numSamples == color->numSamples());
- numSamples = color->numSamples();
- }
- GrAlwaysAssert(numSamples);
- *params = numSamples;
+ case GR_GL_SAMPLES:
+ *params = 1;
break;
- }
case GR_GL_FRAMEBUFFER_BINDING:
*params = 0;
break;
diff --git a/tools/gpu/gl/debug/GrFBBindableObj.h b/tools/gpu/gl/debug/GrFBBindableObj.h
index f5b46ab5d9..e2b43a6a1b 100644
--- a/tools/gpu/gl/debug/GrFBBindableObj.h
+++ b/tools/gpu/gl/debug/GrFBBindableObj.h
@@ -18,8 +18,7 @@ class GrFBBindableObj : public GrFakeRefObj {
public:
GrFBBindableObj()
- : GrFakeRefObj()
- , fNumSamples(1) {
+ : GrFakeRefObj() {
}
virtual ~GrFBBindableObj() {
@@ -76,11 +75,8 @@ public:
return 0 != fStencilReferees.count();
}
- int numSamples() { return fNumSamples; }
protected:
- int fNumSamples;
-
private:
SkTDArray<GrFakeRefObj *> fColorReferees; // frame buffers that use this as a color buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D")
SkTDArray<GrFakeRefObj *> fDepthReferees; // frame buffers that use this as a depth buffer (via "glFramebufferRenderbuffer" or "glFramebufferTexture2D")
diff --git a/tools/gpu/gl/debug/GrRenderBufferObj.h b/tools/gpu/gl/debug/GrRenderBufferObj.h
index 134b9ec763..8231ef58df 100644
--- a/tools/gpu/gl/debug/GrRenderBufferObj.h
+++ b/tools/gpu/gl/debug/GrRenderBufferObj.h
@@ -30,11 +30,6 @@ public:
this->INHERITED::deleteAction();
}
- void setNumSamples(int numSamples) {
- GrAlwaysAssert(numSamples > 0);
- fNumSamples = numSamples;
- }
-
protected:
private:
bool fBound; // is this render buffer currently bound via "glBindRenderbuffer"?