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

Unified Diff: trunk/src/content/common/gpu/image_transport_surface_mac.cc

Issue 16841006: Revert 205481 "Virtual context MakeCurrent tweaks." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/common/gpu/image_transport_surface_mac.cc
===================================================================
--- trunk/src/content/common/gpu/image_transport_surface_mac.cc (revision 205969)
+++ trunk/src/content/common/gpu/image_transport_surface_mac.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/gpu/gpu_command_buffer_stub.h"
#include "content/common/gpu/gpu_messages.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_bindings.h"
@@ -34,10 +33,8 @@
// We are backed by an offscreen surface for the purposes of creating
// a context, but use FBOs to render to texture backed IOSurface
-class IOSurfaceImageTransportSurface
- : public gfx::NoOpGLSurfaceCGL,
- public ImageTransportSurface,
- public GpuCommandBufferStub::DestructionObserver {
+class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
+ public ImageTransportSurface {
public:
IOSurfaceImageTransportSurface(GpuChannelManager* manager,
GpuCommandBufferStub* stub,
@@ -65,9 +62,6 @@
virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
virtual void SetLatencyInfo(const ui::LatencyInfo&) OVERRIDE;
- // GpuCommandBufferStub::DestructionObserver implementation.
- virtual void OnWillDestroyStub() OVERRIDE;
-
private:
virtual ~IOSurfaceImageTransportSurface() OVERRIDE;
@@ -144,6 +138,7 @@
}
IOSurfaceImageTransportSurface::~IOSurfaceImageTransportSurface() {
+ Destroy();
}
bool IOSurfaceImageTransportSurface::Initialize() {
@@ -156,14 +151,7 @@
if (!helper_->Initialize())
return false;
-
- if (!NoOpGLSurfaceCGL::Initialize()) {
- helper_->Destroy();
- return false;
- }
-
- helper_->stub()->AddDestructionObserver(this);
- return true;
+ return NoOpGLSurfaceCGL::Initialize();
}
void IOSurfaceImageTransportSurface::Destroy() {
@@ -325,11 +313,6 @@
latency_info_ = latency_info;
}
-void IOSurfaceImageTransportSurface::OnWillDestroyStub() {
- helper_->stub()->RemoveDestructionObserver(this);
- Destroy();
-}
-
void IOSurfaceImageTransportSurface::UnrefIOSurface() {
// If we have resources to destroy, then make sure that we have a current
// context which we can use to delete the resources.
« no previous file with comments | « trunk/src/content/common/gpu/gpu_command_buffer_stub.cc ('k') | trunk/src/gpu/command_buffer/service/gl_context_virtual.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698