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

Side by Side Diff: mojo/cc/context_provider_mojo.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « mojo/cc/context_provider_mojo.h ('k') | mojo/common/trace_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/cc/context_provider_mojo.h" 5 #include "mojo/cc/context_provider_mojo.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/public/cpp/environment/environment.h" 8 #include "mojo/public/cpp/environment/environment.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 28 matching lines...) Expand all
39 return static_cast<gpu::ContextSupport*>( 39 return static_cast<gpu::ContextSupport*>(
40 MojoGLES2GetContextSupport(context_)); 40 MojoGLES2GetContextSupport(context_));
41 } 41 }
42 42
43 class GrContext* ContextProviderMojo::GrContext() { return NULL; } 43 class GrContext* ContextProviderMojo::GrContext() { return NULL; }
44 44
45 cc::ContextProvider::Capabilities ContextProviderMojo::ContextCapabilities() { 45 cc::ContextProvider::Capabilities ContextProviderMojo::ContextCapabilities() {
46 return capabilities_; 46 return capabilities_;
47 } 47 }
48 48
49 void ContextProviderMojo::SetupLock() {
50 }
51
52 base::Lock* ContextProviderMojo::GetLock() {
53 return &context_lock_;
54 }
55
49 bool ContextProviderMojo::IsContextLost() { 56 bool ContextProviderMojo::IsContextLost() {
50 return context_lost_; 57 return context_lost_;
51 } 58 }
52 bool ContextProviderMojo::DestroyedOnMainThread() { return !context_; } 59 bool ContextProviderMojo::DestroyedOnMainThread() { return !context_; }
53 60
54 ContextProviderMojo::~ContextProviderMojo() { 61 ContextProviderMojo::~ContextProviderMojo() {
55 if (context_) 62 if (context_)
56 MojoGLES2DestroyContext(context_); 63 MojoGLES2DestroyContext(context_);
57 } 64 }
58 65
59 void ContextProviderMojo::ContextLost() { 66 void ContextProviderMojo::ContextLost() {
60 context_lost_ = true; 67 context_lost_ = true;
61 } 68 }
62 69
63 } // namespace mojo 70 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/cc/context_provider_mojo.h ('k') | mojo/common/trace_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698