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

Unified Diff: components/mus/gles2/command_buffer_impl.cc

Issue 1854953002: Plumb GpuSwapBuffers completion from Mus GPU thread to WS thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review nits Created 4 years, 9 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: components/mus/gles2/command_buffer_impl.cc
diff --git a/components/mus/gles2/command_buffer_impl.cc b/components/mus/gles2/command_buffer_impl.cc
index 13ce77c035928ffd38ab095ea6a10d65021886bc..20018b111ddb3b76493cde55e7592b7d3d98b300 100644
--- a/components/mus/gles2/command_buffer_impl.cc
+++ b/components/mus/gles2/command_buffer_impl.cc
@@ -32,23 +32,6 @@ void RunMakeProgressCallback(
} // namespace
-class CommandBufferImpl::CommandBufferDriverClientImpl
- : public CommandBufferDriver::Client {
- public:
- explicit CommandBufferDriverClientImpl(CommandBufferImpl* command_buffer)
- : command_buffer_(command_buffer) {}
-
- private:
- void DidLoseContext(uint32_t reason) override {
- command_buffer_->DidLoseContext(reason);
- }
- void UpdateVSyncParameters(int64_t timebase, int64_t interval) override {}
-
- CommandBufferImpl* command_buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(CommandBufferDriverClientImpl);
-};
-
CommandBufferImpl::CommandBufferImpl(
mojo::InterfaceRequest<mus::mojom::CommandBuffer> request,
scoped_refptr<GpuState> gpu_state)
@@ -65,6 +48,11 @@ void CommandBufferImpl::DidLoseContext(uint32_t reason) {
client_->Destroyed(reason, gpu::error::kLostContext);
}
+void CommandBufferImpl::UpdateVSyncParameters(int64_t timebase,
+ int64_t interval) {}
+
+void CommandBufferImpl::OnGpuCompletedSwapBuffers(gfx::SwapResult result) {}
+
CommandBufferImpl::~CommandBufferImpl() {
}
@@ -192,7 +180,7 @@ void CommandBufferImpl::InitializeOnGpuThread(
gpu::CommandBufferNamespace::MOJO,
gpu::CommandBufferId::FromUnsafeValue(++g_next_command_buffer_id),
gfx::kNullAcceleratedWidget, gpu_state_));
- driver_->set_client(make_scoped_ptr(new CommandBufferDriverClientImpl(this)));
+ driver_->set_client(this);
client_ = mojo::MakeProxy(client.PassInterface());
bool result =
driver_->Initialize(std::move(shared_state), std::move(attribs));

Powered by Google App Engine
This is Rietveld 408576698