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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 843883002: [Android] Fix a flicker in stopping Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 3745a376a347e0412999f2652ec4e3df8bb264f7..e32a6600e6e2a7fbbcede995861b448d08d8b10a 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -182,6 +182,7 @@ CompositorImpl::CompositorImpl(CompositorClient* client,
composite_on_vsync_trigger_(DO_NOT_COMPOSITE),
pending_swapbuffers_(0U),
defer_composite_for_gpu_channel_(false),
+ paused_(false),
weak_factory_(this) {
DCHECK(client);
DCHECK(root_window);
@@ -262,6 +263,9 @@ void CompositorImpl::OnGpuChannelEstablished() {
}
void CompositorImpl::Composite(CompositingTrigger trigger) {
+ if (paused_)
David Trainor- moved to gerrit 2015/01/12 18:58:24 Does bypassing this cause side effects? I know so
no sievers 2015/01/12 19:56:49 TLDR: We should either unify our code more with Au
Changwan Ryu 2015/01/13 02:24:55 Thanks for pointing out the conflict, and CopyFrom
+ return;
+
if (trigger == COMPOSITE_IMMEDIATELY)
will_composite_immediately_ = false;
@@ -327,6 +331,14 @@ ui::ResourceManager& CompositorImpl::GetResourceManager() {
return resource_manager_;
}
+void CompositorImpl::Pause() {
+ paused_ = true;
+}
+
+void CompositorImpl::Resume() {
+ paused_ = false;
+}
+
void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
if (subroot_layer_.get()) {
subroot_layer_->RemoveFromParent();
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.h ('k') | content/public/browser/android/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698