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

Side by Side Diff: components/mus/surfaces/surfaces_context_provider.cc

Issue 1936423002: Remove unused locks in mus ContextProvider classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 4 years, 7 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 | « components/mus/surfaces/surfaces_context_provider.h ('k') | no next file » | 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 "components/mus/surfaces/surfaces_context_provider.h" 5 #include "components/mus/surfaces/surfaces_context_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void SurfacesContextProvider::InvalidateGrContext(uint32_t state) {} 87 void SurfacesContextProvider::InvalidateGrContext(uint32_t state) {}
88 88
89 gpu::Capabilities SurfacesContextProvider::ContextCapabilities() { 89 gpu::Capabilities SurfacesContextProvider::ContextCapabilities() {
90 return capabilities_; 90 return capabilities_;
91 } 91 }
92 92
93 void SurfacesContextProvider::SetupLock() {} 93 void SurfacesContextProvider::SetupLock() {}
94 94
95 base::Lock* SurfacesContextProvider::GetLock() { 95 base::Lock* SurfacesContextProvider::GetLock() {
96 return &context_lock_; 96 // This context provider is not used on multiple threads.
97 NOTREACHED();
98 return nullptr;
97 } 99 }
98 100
99 void SurfacesContextProvider::SetLostContextCallback( 101 void SurfacesContextProvider::SetLostContextCallback(
100 const LostContextCallback& lost_context_callback) { 102 const LostContextCallback& lost_context_callback) {
101 implementation_->SetLostContextCallback(lost_context_callback); 103 implementation_->SetLostContextCallback(lost_context_callback);
102 } 104 }
103 105
104 SurfacesContextProvider::~SurfacesContextProvider() { 106 SurfacesContextProvider::~SurfacesContextProvider() {
105 implementation_->Flush(); 107 implementation_->Flush();
106 implementation_.reset(); 108 implementation_.reset();
(...skipping 14 matching lines...) Expand all
121 swap_buffers_completion_callback_.Run(result); 123 swap_buffers_completion_callback_.Run(result);
122 } 124 }
123 } 125 }
124 126
125 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( 127 void SurfacesContextProvider::SetSwapBuffersCompletionCallback(
126 gfx::GLSurface::SwapCompletionCallback callback) { 128 gfx::GLSurface::SwapCompletionCallback callback) {
127 swap_buffers_completion_callback_ = callback; 129 swap_buffers_completion_callback_ = callback;
128 } 130 }
129 131
130 } // namespace mus 132 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/surfaces/surfaces_context_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698