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

Unified Diff: services/gles2/command_buffer_driver.cc

Issue 772523004: Move code in //services/gles2 into namespace gles2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « services/gles2/command_buffer_driver.h ('k') | services/gles2/command_buffer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gles2/command_buffer_driver.cc
diff --git a/services/gles2/command_buffer_driver.cc b/services/gles2/command_buffer_driver.cc
index c5cfac1f9160b92fcf05bd74ba4abd3c07088536..2a0c5a2e9b61b00871f549adec9a2f97ac2e3d1e 100644
--- a/services/gles2/command_buffer_driver.cc
+++ b/services/gles2/command_buffer_driver.cc
@@ -23,7 +23,7 @@
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_surface.h"
-namespace mojo {
+namespace gles2 {
namespace {
@@ -83,17 +83,19 @@ CommandBufferDriver::~CommandBufferDriver() {
client_->DidDestroy();
}
-void CommandBufferDriver::Initialize(CommandBufferSyncClientPtr sync_client,
- ScopedSharedBufferHandle shared_state) {
+void CommandBufferDriver::Initialize(
+ mojo::CommandBufferSyncClientPtr sync_client,
+ mojo::ScopedSharedBufferHandle shared_state) {
sync_client_ = sync_client.Pass();
bool success = DoInitialize(shared_state.Pass());
- GpuCapabilitiesPtr capabilities =
- success ? GpuCapabilities::From(decoder_->GetCapabilities())
- : GpuCapabilities::New();
+ mojo::GpuCapabilitiesPtr capabilities =
+ success ? mojo::GpuCapabilities::From(decoder_->GetCapabilities())
+ : mojo::GpuCapabilities::New();
sync_client_->DidInitialize(success, capabilities.Pass());
}
-bool CommandBufferDriver::DoInitialize(ScopedSharedBufferHandle shared_state) {
+bool CommandBufferDriver::DoInitialize(
+ mojo::ScopedSharedBufferHandle shared_state) {
if (widget_ == gfx::kNullAcceleratedWidget)
surface_ = gfx::GLSurface::CreateOffscreenGLSurface(size_);
else {
@@ -179,12 +181,12 @@ void CommandBufferDriver::Flush(int32_t put_offset) {
void CommandBufferDriver::MakeProgress(int32_t last_get_offset) {
// TODO(piman): handle out-of-order.
sync_client_->DidMakeProgress(
- CommandBufferState::From(command_buffer_->GetLastState()));
+ mojo::CommandBufferState::From(command_buffer_->GetLastState()));
}
void CommandBufferDriver::RegisterTransferBuffer(
int32_t id,
- ScopedSharedBufferHandle transfer_buffer,
+ mojo::ScopedSharedBufferHandle transfer_buffer,
uint32_t size) {
// Take ownership of the memory and map it into this process.
// This validates the size.
@@ -201,7 +203,7 @@ void CommandBufferDriver::DestroyTransferBuffer(int32_t id) {
command_buffer_->DestroyTransferBuffer(id);
}
-void CommandBufferDriver::Echo(const Callback<void()>& callback) {
+void CommandBufferDriver::Echo(const mojo::Callback<void()>& callback) {
callback.Run();
}
@@ -240,4 +242,4 @@ void CommandBufferDriver::OnUpdateVSyncParameters(
client_->UpdateVSyncParameters(timebase, interval);
}
-} // namespace mojo
+} // namespace gles2
« no previous file with comments | « services/gles2/command_buffer_driver.h ('k') | services/gles2/command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698