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

Unified Diff: components/mus/public/cpp/gles2_context.h

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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: components/mus/public/cpp/gles2_context.h
diff --git a/components/mus/public/cpp/gles2_context.h b/components/mus/public/cpp/gles2_context.h
index c275ba56f52e11e094fbabfe49631ccad7c56bde..03b069f478dfa21af1ddeea26408b58ba214f6d4 100644
--- a/components/mus/public/cpp/gles2_context.h
+++ b/components/mus/public/cpp/gles2_context.h
@@ -11,33 +11,44 @@
#include <vector>
#include "base/macros.h"
-#include "components/mus/public/cpp/lib/command_buffer_client_impl.h"
+#include "components/mus/public/interfaces/command_buffer.mojom.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
namespace gpu {
+class CommandBufferProxyImpl;
class TransferBuffer;
namespace gles2 {
class GLES2CmdHelper;
-class GLES2Implementation;
}
}
+namespace shell {
+class Connector;
+}
+
namespace mus {
+class CommandBufferClientImpl;
+
class GLES2Context {
public:
- explicit GLES2Context(const std::vector<int32_t>& attribs,
- mus::mojom::CommandBufferPtr command_buffer_ptr);
- virtual ~GLES2Context();
- bool Initialize();
-
+ ~GLES2Context();
gpu::gles2::GLES2Interface* interface() const {
return implementation_.get();
}
gpu::ContextSupport* context_support() const { return implementation_.get(); }
+ static std::unique_ptr<GLES2Context> CreateOffscreenContext(
+ const std::vector<int32_t>& attribs,
+ shell::Connector* connector);
+
private:
- CommandBufferClientImpl command_buffer_;
+ GLES2Context();
+ bool Initialize(const std::vector<int32_t>& attribs,
+ shell::Connector* connector);
+
+ std::unique_ptr<CommandBufferClientImpl> command_buffer_client_impl_;
+ std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_proxy_impl_;
std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
« no previous file with comments | « components/mus/public/cpp/context_provider.h ('k') | components/mus/public/cpp/lib/command_buffer_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698