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

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

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.h
diff --git a/components/mus/gles2/command_buffer_impl.h b/components/mus/gles2/command_buffer_impl.h
index 6bdbef88a8541c05f3577c5a7165abfff6642810..1bcc429f67e8bef6dded261d545f0c0f32c1055d 100644
--- a/components/mus/gles2/command_buffer_impl.h
+++ b/components/mus/gles2/command_buffer_impl.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
+#include "components/mus/gles2/command_buffer_driver.h"
#include "components/mus/public/interfaces/command_buffer.mojom.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -24,16 +25,21 @@ class GpuState;
// so that we can insert sync points without blocking on the GL driver. It
// forwards most method calls to the CommandBufferDriver, which runs on the
// same thread as the native viewport.
-class CommandBufferImpl : public mojom::CommandBuffer {
+class CommandBufferImpl : public mojom::CommandBuffer,
+ public CommandBufferDriver::Client {
public:
CommandBufferImpl(mojo::InterfaceRequest<CommandBuffer> request,
scoped_refptr<GpuState> gpu_state);
- void DidLoseContext(uint32_t reason);
private:
class CommandBufferDriverClientImpl;
~CommandBufferImpl() override;
+ // CommandBufferDriver::Client. All called on the GPU thread.
+ void DidLoseContext(uint32_t reason) override;
+ void UpdateVSyncParameters(int64_t timebase, int64_t interval) override;
+ void OnGpuCompletedSwapBuffers(gfx::SwapResult result) override;
+
// mojom::CommandBuffer:
void Initialize(
mojom::CommandBufferClientPtr client,

Powered by Google App Engine
This is Rietveld 408576698