Index: components/view_manager/gles2/command_buffer_driver.cc |
diff --git a/components/view_manager/gles2/command_buffer_driver.cc b/components/view_manager/gles2/command_buffer_driver.cc |
index 5a4ac83fb4943738eae6efe524845352e6ee23a7..e31d8e32c10fb7803139d890cb11f2913cdf4afb 100644 |
--- a/components/view_manager/gles2/command_buffer_driver.cc |
+++ b/components/view_manager/gles2/command_buffer_driver.cc |
@@ -37,25 +37,13 @@ CommandBufferDriver::Client::~Client() { |
} |
CommandBufferDriver::CommandBufferDriver(scoped_refptr<GpuState> gpu_state) |
- : CommandBufferDriver(gfx::kNullAcceleratedWidget, |
- gpu_state, |
- base::Callback<void(CommandBufferDriver*)>()) {} |
- |
-CommandBufferDriver::CommandBufferDriver( |
- gfx::AcceleratedWidget widget, |
- scoped_refptr<GpuState> gpu_state, |
- const base::Callback<void(CommandBufferDriver*)>& destruct_callback) |
: client_(nullptr), |
- widget_(widget), |
gpu_state_(gpu_state), |
- destruct_callback_(destruct_callback), |
weak_factory_(this) { |
} |
CommandBufferDriver::~CommandBufferDriver() { |
DestroyDecoder(); |
- if (!destruct_callback_.is_null()) |
- destruct_callback_.Run(this); |
} |
void CommandBufferDriver::Initialize( |
@@ -88,16 +76,7 @@ bool CommandBufferDriver::MakeCurrent() { |
bool CommandBufferDriver::DoInitialize( |
mojo::ScopedSharedBufferHandle shared_state) { |
- if (widget_ == gfx::kNullAcceleratedWidget) |
- surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); |
- else { |
- surface_ = gfx::GLSurface::CreateViewGLSurface(widget_); |
- if (auto vsync_provider = surface_->GetVSyncProvider()) { |
- vsync_provider->GetVSyncParameters( |
- base::Bind(&CommandBufferDriver::OnUpdateVSyncParameters, |
- weak_factory_.GetWeakPtr())); |
- } |
- } |
+ surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); |
if (!surface_.get()) |
return false; |
@@ -177,13 +156,6 @@ void CommandBufferDriver::Flush(int32_t put_offset) { |
command_buffer_->Flush(put_offset); |
} |
-void CommandBufferDriver::DestroyWindow() { |
- DestroyDecoder(); |
- surface_ = nullptr; |
- context_ = nullptr; |
- destruct_callback_.Reset(); |
-} |
- |
void CommandBufferDriver::MakeProgress(int32_t last_get_offset) { |
// TODO(piman): handle out-of-order. |
sync_client_->DidMakeProgress( |
@@ -325,12 +297,6 @@ void CommandBufferDriver::OnContextLost(uint32_t reason) { |
client_->DidLoseContext(); |
} |
-void CommandBufferDriver::OnUpdateVSyncParameters( |
- const base::TimeTicks timebase, |
- const base::TimeDelta interval) { |
- client_->UpdateVSyncParameters(timebase, interval); |
-} |
- |
void CommandBufferDriver::DestroyDecoder() { |
if (decoder_) { |
bool have_context = decoder_->MakeCurrent(); |