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

Unified Diff: services/surfaces/context_provider_mojo.cc

Issue 1536863002: Delete the Surfaces service. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-4
Patch Set: rebase Created 4 years, 11 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 | « services/surfaces/context_provider_mojo.h ('k') | services/surfaces/display_factory_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/surfaces/context_provider_mojo.cc
diff --git a/services/surfaces/context_provider_mojo.cc b/services/surfaces/context_provider_mojo.cc
deleted file mode 100644
index 9bc4ee53e614900ff5a934a50c603cbed55d5287..0000000000000000000000000000000000000000
--- a/services/surfaces/context_provider_mojo.cc
+++ /dev/null
@@ -1,79 +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 "services/surfaces/context_provider_mojo.h"
-
-#include "base/logging.h"
-#include "mojo/gpu/mojo_context_support.h"
-#include "mojo/gpu/mojo_gles2_impl_autogen.h"
-#include "mojo/public/cpp/environment/environment.h"
-
-namespace mojo {
-
-ContextProviderMojo::ContextProviderMojo(
- ScopedMessagePipeHandle command_buffer_handle)
- : command_buffer_handle_(command_buffer_handle.Pass()),
- context_(nullptr),
- context_lost_(false) {
-}
-
-bool ContextProviderMojo::BindToCurrentThread() {
- DCHECK(command_buffer_handle_.is_valid());
- context_ = MGLCreateContext(MGL_API_VERSION_GLES2,
- command_buffer_handle_.release().value(),
- MGL_NO_CONTEXT, &ContextLostThunk, this,
- Environment::GetDefaultAsyncWaiter());
- DCHECK(context_);
- context_support_.reset(new MojoContextSupport(context_));
- gles2_impl_.reset(new MojoGLES2Impl(context_));
- return !!context_;
-}
-
-gpu::gles2::GLES2Interface* ContextProviderMojo::ContextGL() {
- return gles2_impl_.get();
-}
-
-gpu::ContextSupport* ContextProviderMojo::ContextSupport() {
- return context_support_.get();
-}
-
-class GrContext* ContextProviderMojo::GrContext() {
- return NULL;
-}
-
-cc::ContextProvider::Capabilities ContextProviderMojo::ContextCapabilities() {
- return capabilities_;
-}
-
-void ContextProviderMojo::SetupLock() {
-}
-
-base::Lock* ContextProviderMojo::GetLock() {
- return &context_lock_;
-}
-
-bool ContextProviderMojo::IsContextLost() {
- return context_lost_;
-}
-bool ContextProviderMojo::DestroyedOnMainThread() {
- return !context_;
-}
-
-void ContextProviderMojo::SetLostContextCallback(
- const LostContextCallback& lost_context_callback) {
- lost_context_callback_ = lost_context_callback;
-}
-
-ContextProviderMojo::~ContextProviderMojo() {
- if (context_)
- MGLDestroyContext(context_);
-}
-
-void ContextProviderMojo::ContextLost() {
- context_lost_ = true;
- if (!lost_context_callback_.is_null())
- lost_context_callback_.Run();
-}
-
-} // namespace mojo
« no previous file with comments | « services/surfaces/context_provider_mojo.h ('k') | services/surfaces/display_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698