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

Side by Side Diff: android_webview/browser/shared_renderer_state.cc

Issue 260213002: Add lock back to SharedRendererState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove bvr change Created 6 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 | Annotate | Revision Log
« no previous file with comments | « android_webview/browser/shared_renderer_state.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 "android_webview/browser/shared_renderer_state.h" 5 #include "android_webview/browser/shared_renderer_state.h"
6 6
7 #include "android_webview/browser/browser_view_renderer_client.h" 7 #include "android_webview/browser/browser_view_renderer_client.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 void SharedRendererState::ClientRequestDrawGLOnUIThread() { 41 void SharedRendererState::ClientRequestDrawGLOnUIThread() {
42 DCHECK(ui_loop_->BelongsToCurrentThread()); 42 DCHECK(ui_loop_->BelongsToCurrentThread());
43 if (!client_on_ui_->RequestDrawGL(NULL)) { 43 if (!client_on_ui_->RequestDrawGL(NULL)) {
44 LOG(ERROR) << "Failed to request GL process. Deadlock likely"; 44 LOG(ERROR) << "Failed to request GL process. Deadlock likely";
45 } 45 }
46 } 46 }
47 47
48 void SharedRendererState::SetCompositorOnUiThread( 48 void SharedRendererState::SetCompositorOnUiThread(
49 content::SynchronousCompositor* compositor) { 49 content::SynchronousCompositor* compositor) {
50 base::AutoLock lock(lock_);
50 DCHECK(ui_loop_->BelongsToCurrentThread()); 51 DCHECK(ui_loop_->BelongsToCurrentThread());
51 compositor_ = compositor; 52 compositor_ = compositor;
52 } 53 }
53 54
54 content::SynchronousCompositor* SharedRendererState::GetCompositor() { 55 content::SynchronousCompositor* SharedRendererState::GetCompositor() {
56 base::AutoLock lock(lock_);
55 DCHECK(compositor_); 57 DCHECK(compositor_);
56 return compositor_; 58 return compositor_;
57 } 59 }
58 60
59 void SharedRendererState::SetDrawGLInput(const DrawGLInput& input) { 61 void SharedRendererState::SetDrawGLInput(const DrawGLInput& input) {
62 base::AutoLock lock(lock_);
60 draw_gl_input_ = input; 63 draw_gl_input_ = input;
61 } 64 }
62 65
63 DrawGLInput SharedRendererState::GetDrawGLInput() const { 66 DrawGLInput SharedRendererState::GetDrawGLInput() const {
67 base::AutoLock lock(lock_);
64 return draw_gl_input_; 68 return draw_gl_input_;
65 } 69 }
66 70
67 } // namespace android_webview 71 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/shared_renderer_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698