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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1929973003: Revert of command_buffer_gles2: Implement EGL default Display as a global object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@command_buffer_gles2-multiple-contexts
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e95649acab2d65a116ce16075c6520924189e92b..33b32821ac94495ba062e86fc657e0870b4bc0b2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -593,7 +593,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();
@@ -3645,7 +3644,6 @@
// } // anonymous namespace
bool GLES2DecoderImpl::MakeCurrent() {
- DCHECK(surface_);
if (!context_.get())
return false;
@@ -4202,20 +4200,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) {
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698