Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index ec64818175c75c1a91324b904d2cb6a3359918f8..77aa684d64747cef8b723d01b931a554c8e97832 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -594,7 +594,6 @@ |
const std::vector<int32_t>& attribs) override; |
void Destroy(bool have_context) override; |
void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) override; |
- void ReleaseSurface() override; |
void ProduceFrontBuffer(const Mailbox& mailbox) override; |
bool ResizeOffscreenFrameBuffer(const gfx::Size& size) override; |
void UpdateParentTextureInfo(); |
@@ -3723,7 +3722,6 @@ |
// } // anonymous namespace |
bool GLES2DecoderImpl::MakeCurrent() { |
- DCHECK(surface_); |
if (!context_.get()) |
return false; |
@@ -4281,20 +4279,9 @@ |
void GLES2DecoderImpl::SetSurface( |
const scoped_refptr<gfx::GLSurface>& surface) { |
DCHECK(context_->IsCurrent(NULL)); |
- DCHECK(surface); |
+ DCHECK(surface_.get()); |
surface_ = surface; |
RestoreCurrentFramebufferBindings(); |
-} |
- |
-void GLES2DecoderImpl::ReleaseSurface() { |
- if (!context_.get()) |
- return; |
- if (WasContextLost()) { |
- DLOG(ERROR) << " GLES2DecoderImpl: Trying to release lost context."; |
- return; |
- } |
- context_->ReleaseCurrent(surface_.get()); |
- surface_ = nullptr; |
} |
void GLES2DecoderImpl::ProduceFrontBuffer(const Mailbox& mailbox) { |