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

Unified Diff: mojo/gles2/gles2_context.cc

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 years, 2 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/gles2_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
deleted file mode 100644
index c454aed439b3dbf23604cde3824c8ce475e55f78..0000000000000000000000000000000000000000
--- a/mojo/gles2/gles2_context.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/gles2/gles2_context.h"
-
-#include "gpu/command_buffer/client/gles2_cmd_helper.h"
-#include "gpu/command_buffer/client/gles2_implementation.h"
-#include "gpu/command_buffer/client/transfer_buffer.h"
-#include "mojo/public/c/gles2/gles2.h"
-#include "mojo/public/cpp/system/core.h"
-
-namespace mojo {
-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;
-}
-
-GLES2Context::GLES2Context(const MojoAsyncWaiter* async_waiter,
- ScopedMessagePipeHandle command_buffer_handle,
- MojoGLES2ContextLost lost_callback,
- void* closure)
- : command_buffer_(this, async_waiter, command_buffer_handle.Pass()),
- lost_callback_(lost_callback),
- closure_(closure) {}
-
-GLES2Context::~GLES2Context() {}
-
-bool GLES2Context::Initialize() {
- if (!command_buffer_.Initialize())
- return false;
- gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(&command_buffer_));
- if (!gles2_helper_->Initialize(kDefaultCommandBufferSize))
- return false;
- gles2_helper_->SetAutomaticFlushes(false);
- transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get()));
- bool bind_generates_resource = true;
- // TODO(piman): Some contexts (such as compositor) want this to be true, so
- // this needs to be a public parameter.
- bool lose_context_when_out_of_memory = false;
- implementation_.reset(
- new gpu::gles2::GLES2Implementation(gles2_helper_.get(),
- NULL,
- transfer_buffer_.get(),
- bind_generates_resource,
- lose_context_when_out_of_memory,
- &command_buffer_));
- return implementation_->Initialize(kDefaultStartTransferBufferSize,
- kDefaultMinTransferBufferSize,
- kDefaultMaxTransferBufferSize,
- gpu::gles2::GLES2Implementation::kNoLimit);
-}
-
-void GLES2Context::ContextLost() { lost_callback_(closure_); }
-
-} // namespace gles2
-} // namespace mojo
« no previous file with comments | « mojo/gles2/gles2_context.h ('k') | mojo/gles2/gles2_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698