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

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

Issue 585093003: aw: Block child compositor if frame is not consumed by parent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove extra blank line Created 6 years, 3 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 | « 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/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 g_request_draw_gl_tracker.Get().ResetPending(); 127 g_request_draw_gl_tracker.Get().ResetPending();
128 LOG(ERROR) << "Failed to request GL process. Deadlock likely"; 128 LOG(ERROR) << "Failed to request GL process. Deadlock likely";
129 } 129 }
130 } 130 }
131 131
132 void SharedRendererState::UpdateParentDrawConstraintsOnUIThread() { 132 void SharedRendererState::UpdateParentDrawConstraintsOnUIThread() {
133 DCHECK(ui_loop_->BelongsToCurrentThread()); 133 DCHECK(ui_loop_->BelongsToCurrentThread());
134 client_on_ui_->UpdateParentDrawConstraints(); 134 client_on_ui_->UpdateParentDrawConstraints();
135 } 135 }
136 136
137 bool SharedRendererState::HasDrawGLInput() const {
138 base::AutoLock lock(lock_);
139 return draw_gl_input_.get();
140 }
141
137 void SharedRendererState::SetDrawGLInput(scoped_ptr<DrawGLInput> input) { 142 void SharedRendererState::SetDrawGLInput(scoped_ptr<DrawGLInput> input) {
138 base::AutoLock lock(lock_); 143 base::AutoLock lock(lock_);
139 DCHECK(!draw_gl_input_.get()); 144 DCHECK(!draw_gl_input_.get());
140 draw_gl_input_ = input.Pass(); 145 draw_gl_input_ = input.Pass();
141 } 146 }
142 147
143 scoped_ptr<DrawGLInput> SharedRendererState::PassDrawGLInput() { 148 scoped_ptr<DrawGLInput> SharedRendererState::PassDrawGLInput() {
144 base::AutoLock lock(lock_); 149 base::AutoLock lock(lock_);
145 return draw_gl_input_.Pass(); 150 return draw_gl_input_.Pass();
146 } 151 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 : shared_renderer_state_(shared_renderer_state) { 207 : shared_renderer_state_(shared_renderer_state) {
203 DCHECK(!shared_renderer_state_->IsInsideHardwareRelease()); 208 DCHECK(!shared_renderer_state_->IsInsideHardwareRelease());
204 shared_renderer_state_->SetInsideHardwareRelease(true); 209 shared_renderer_state_->SetInsideHardwareRelease(true);
205 } 210 }
206 211
207 InsideHardwareReleaseReset::~InsideHardwareReleaseReset() { 212 InsideHardwareReleaseReset::~InsideHardwareReleaseReset() {
208 shared_renderer_state_->SetInsideHardwareRelease(false); 213 shared_renderer_state_->SetInsideHardwareRelease(false);
209 } 214 }
210 215
211 } // namespace android_webview 216 } // 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