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

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

Issue 1038133003: Fix crash in taking a screenshot of a closed popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | 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 (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 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 } 791 }
792 792
793 void RenderWidgetCompositor::BeginMainFrameNotExpectedSoon() { 793 void RenderWidgetCompositor::BeginMainFrameNotExpectedSoon() {
794 compositor_deps_->GetRendererScheduler()->BeginFrameNotExpectedSoon(); 794 compositor_deps_->GetRendererScheduler()->BeginFrameNotExpectedSoon();
795 } 795 }
796 796
797 void RenderWidgetCompositor::Layout() { 797 void RenderWidgetCompositor::Layout() {
798 widget_->webwidget()->layout(); 798 widget_->webwidget()->layout();
799 799
800 if (temporary_copy_output_request_) { 800 if (temporary_copy_output_request_) {
801 DCHECK(layer_tree_host_->root_layer()); 801 // For WebViewImpl cases, this will always have a root layer.
802 layer_tree_host_->root_layer()->RequestCopyOfOutput( 802 // For other widgets, the widget may be closed before servicing this
803 temporary_copy_output_request_.Pass()); 803 // request, so ignore it.
804 if (cc::Layer* root_layer = layer_tree_host_->root_layer())
805 root_layer->RequestCopyOfOutput(temporary_copy_output_request_.Pass());
806 else
807 temporary_copy_output_request_->SendEmptyResult();
808 temporary_copy_output_request_ = nullptr;
piman 2015/03/26 23:09:58 nit: wrong indent, or did you forget brackets? (it
enne (OOO) 2015/03/27 17:40:52 Last minute edit; forgot brackets. <_< *blush*
804 } 809 }
805 } 810 }
806 811
807 void RenderWidgetCompositor::ApplyViewportDeltas( 812 void RenderWidgetCompositor::ApplyViewportDeltas(
808 const gfx::Vector2dF& inner_delta, 813 const gfx::Vector2dF& inner_delta,
809 const gfx::Vector2dF& outer_delta, 814 const gfx::Vector2dF& outer_delta,
810 const gfx::Vector2dF& elastic_overscroll_delta, 815 const gfx::Vector2dF& elastic_overscroll_delta,
811 float page_scale, 816 float page_scale,
812 float top_controls_delta) { 817 float top_controls_delta) {
813 widget_->webwidget()->applyViewportDeltas( 818 widget_->webwidget()->applyViewportDeltas(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 cc::ContextProvider* provider = 915 cc::ContextProvider* provider =
911 compositor_deps_->GetSharedMainThreadContextProvider(); 916 compositor_deps_->GetSharedMainThreadContextProvider();
912 // provider can be NULL after the GPU process crashed enough times and we 917 // provider can be NULL after the GPU process crashed enough times and we
913 // don't want to restart it any more (falling back to software). 918 // don't want to restart it any more (falling back to software).
914 if (!provider) 919 if (!provider)
915 return; 920 return;
916 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 921 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
917 } 922 }
918 923
919 } // namespace content 924 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698