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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added screenshot sync test to telemetry unittests, updated cc unittest Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { 385 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() {
386 layer_tree_host_->NotifyInputThrottledUntilCommit(); 386 layer_tree_host_->NotifyInputThrottledUntilCommit();
387 } 387 }
388 388
389 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { 389 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const {
390 return layer_tree_host_->root_layer(); 390 return layer_tree_host_->root_layer();
391 } 391 }
392 392
393 void RenderWidgetCompositor::SetNeedsForcedRedraw() {
394 layer_tree_host_->SetNextCommitForcesRedraw();
395 setNeedsRedraw();
396 }
397
393 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 398 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
394 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = 399 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy =
395 RenderThreadImpl::current()->compositor_message_loop_proxy(); 400 RenderThreadImpl::current()->compositor_message_loop_proxy();
396 layer_tree_host_ = cc::LayerTreeHost::Create(this, 401 layer_tree_host_ = cc::LayerTreeHost::Create(this,
397 settings, 402 settings,
398 compositor_message_loop_proxy); 403 compositor_message_loop_proxy);
399 return layer_tree_host_; 404 return layer_tree_host_;
400 } 405 }
401 406
402 void RenderWidgetCompositor::setSurfaceReady() { 407 void RenderWidgetCompositor::setSurfaceReady() {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 631 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
627 } 632 }
628 633
629 scoped_refptr<cc::ContextProvider> 634 scoped_refptr<cc::ContextProvider>
630 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 635 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
631 return RenderThreadImpl::current()-> 636 return RenderThreadImpl::current()->
632 OffscreenContextProviderForCompositorThread(); 637 OffscreenContextProviderForCompositorThread();
633 } 638 }
634 639
635 } // namespace content 640 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698