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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1771043002: Separate RenderView from RenderWidget, part 4: Painting calls in the delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 } 2694 }
2695 2695
2696 gfx::Size old_visible_viewport_size = visible_viewport_size_; 2696 gfx::Size old_visible_viewport_size = visible_viewport_size_;
2697 2697
2698 RenderWidget::OnResize(params); 2698 RenderWidget::OnResize(params);
2699 2699
2700 if (old_visible_viewport_size != visible_viewport_size_) 2700 if (old_visible_viewport_size != visible_viewport_size_)
2701 has_scrolled_focused_editable_node_into_rect_ = false; 2701 has_scrolled_focused_editable_node_into_rect_ = false;
2702 } 2702 }
2703 2703
2704 void RenderViewImpl::DidInitiatePaint() { 2704 void RenderViewImpl::RenderWidgetDidCommitAndDrawCompositorFrame() {
2705 #if defined(ENABLE_PLUGINS) 2705 #if defined(ENABLE_PLUGINS)
2706 // Notify all instances that we painted. The same caveats apply as for 2706 // Notify all instances that we painted. The same caveats apply as for
2707 // ViewFlushedPaint regarding instances closing themselves, so we take 2707 // ViewFlushedPaint regarding instances closing themselves, so we take
2708 // similar precautions. 2708 // similar precautions.
2709 PepperPluginSet plugins = active_pepper_instances_; 2709 PepperPluginSet plugins = active_pepper_instances_;
2710 for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) { 2710 for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) {
2711 if (active_pepper_instances_.find(*i) != active_pepper_instances_.end()) 2711 if (active_pepper_instances_.find(*i) != active_pepper_instances_.end())
2712 (*i)->ViewInitiatedPaint(); 2712 (*i)->ViewInitiatedPaint();
2713 } 2713 }
2714 #endif 2714 #endif
2715 } 2715 }
2716 2716
2717 void RenderViewImpl::DidFlushPaint() { 2717 void RenderViewImpl::RenderWidgetDidFlushPaint() {
2718 // If the RenderWidget is closing down then early-exit, otherwise we'll crash. 2718 // If the RenderWidget is closing down then early-exit, otherwise we'll crash.
2719 // See crbug.com/112921. 2719 // See crbug.com/112921.
2720 if (!webview()) 2720 if (!webview())
2721 return; 2721 return;
2722 2722
2723 WebFrame* main_frame = webview()->mainFrame(); 2723 WebFrame* main_frame = webview()->mainFrame();
2724 for (WebFrame* frame = main_frame; frame; 2724 for (WebFrame* frame = main_frame; frame;
2725 frame = frame->traverseNext(false)) { 2725 frame = frame->traverseNext(false)) {
2726 // TODO(nasko): This is a hack for the case in which the top-level 2726 // TODO(nasko): This is a hack for the case in which the top-level
2727 // frame is being rendered in another process. It will not 2727 // frame is being rendered in another process. It will not
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 if (IsUseZoomForDSFEnabled()) { 3545 if (IsUseZoomForDSFEnabled()) {
3546 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3546 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3547 } else { 3547 } else {
3548 webview()->setDeviceScaleFactor(device_scale_factor_); 3548 webview()->setDeviceScaleFactor(device_scale_factor_);
3549 } 3549 }
3550 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3550 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3551 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3551 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3552 } 3552 }
3553 3553
3554 } // namespace content 3554 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698