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

Unified Diff: mojo/gles2/gles2_context.cc

Issue 1909133002: Add MGLEcho (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: git add Created 4 years, 8 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
« no previous file with comments | « mojo/gles2/gles2_context.h ('k') | mojo/gles2/mgl_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/gles2_context.cc
diff --git a/mojo/gles2/gles2_context.cc b/mojo/gles2/gles2_context.cc
index 3c9021cb24df4b79b4670f8083cc1e3771c75936..305074f18c7c813f7b5773fee45ab01ed7e35d5f 100644
--- a/mojo/gles2/gles2_context.cc
+++ b/mojo/gles2/gles2_context.cc
@@ -9,13 +9,14 @@
#include "gpu/command_buffer/client/transfer_buffer.h"
namespace gles2 {
-
namespace {
+
const size_t kDefaultCommandBufferSize = 1024 * 1024;
const size_t kDefaultStartTransferBufferSize = 1 * 1024 * 1024;
const size_t kDefaultMinTransferBufferSize = 1 * 256 * 1024;
const size_t kDefaultMaxTransferBufferSize = 16 * 1024 * 1024;
-}
+
+} // namespace
GLES2Context::GLES2Context(const MojoAsyncWaiter* async_waiter,
mojo::ScopedMessagePipeHandle command_buffer_handle,
@@ -57,18 +58,14 @@ bool GLES2Context::Initialize() {
gpu::gles2::GLES2Implementation::kNoLimit);
}
-namespace {
-void RunSignalSyncCallback(MGLSignalSyncPointCallback callback,
- void* closure) {
- callback(closure);
-}
+void GLES2Context::Echo(MGLEchoCallback callback, void* closure) {
+ implementation_->Echo(base::Bind(callback, closure));
}
void GLES2Context::SignalSyncPoint(uint32_t sync_point,
MGLSignalSyncPointCallback callback,
void* closure) {
- implementation_->SignalSyncPoint(
- sync_point, base::Bind(&RunSignalSyncCallback, callback, closure));
+ implementation_->SignalSyncPoint(sync_point, base::Bind(callback, closure));
}
void GLES2Context::ContextLost() { lost_callback_(closure_); }
« no previous file with comments | « mojo/gles2/gles2_context.h ('k') | mojo/gles2/mgl_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698