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

Unified Diff: ui/compositor/compositor.cc

Issue 277053003: Do FinishAllRendering in WM_WINDOWPOSCHANGING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 788cd484c3ec71d555528ef565af79784f77d7b7..7860192a74d4b81cdd6f218299c78384a3fdd3c8 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -96,7 +96,6 @@ Compositor::Compositor(gfx::AcceleratedWidget widget)
device_scale_factor_(0.0f),
last_started_frame_(0),
last_ended_frame_(0),
- next_draw_is_resize_(false),
disable_schedule_composite_(false),
compositor_lock_(NULL),
defer_draw_scheduling_(false),
@@ -286,18 +285,6 @@ void Compositor::Draw() {
// compositeImmediately() directly.
Layout();
host_->Composite(gfx::FrameTime::Now());
-
-#if defined(OS_WIN)
- // While we resize, we are usually a few frames behind. By blocking
- // the UI thread here we minize the area that is mis-painted, specially
- // in the non-client area. See RenderWidgetHostViewAura::SetBounds for
cpu_(ooo_6.6-7.5) 2014/05/10 02:36:23 I might have put this code here :( Do you know wh
- // more details and bug 177115.
- if (next_draw_is_resize_ && (last_ended_frame_ > 1)) {
- next_draw_is_resize_ = false;
- host_->FinishAllRendering();
- }
-#endif
-
}
if (swap_state_ == SWAP_NONE)
NotifyEnd();
@@ -311,6 +298,10 @@ void Compositor::ScheduleRedrawRect(const gfx::Rect& damage_rect) {
host_->SetNeedsRedrawRect(damage_rect);
}
+void Compositor::FinishAllRendering() {
+ host_->FinishAllRendering();
+}
+
void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) {
scoped_ptr<cc::SwapPromise> swap_promise(
new cc::LatencyInfoSwapPromise(latency_info));
@@ -323,8 +314,6 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
size_ = size_in_pixel;
host_->SetViewportSize(size_in_pixel);
root_web_layer_->SetBounds(size_in_pixel);
-
- next_draw_is_resize_ = true;
}
if (device_scale_factor_ != scale) {
device_scale_factor_ = scale;
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698