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

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

Issue 13926009: Avoid sending empty OnRepaint msgs and propagate window damage correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | 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) 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_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 UMA_HISTOGRAM_TIMES("Renderer4.Snapshot", 1869 UMA_HISTOGRAM_TIMES("Renderer4.Snapshot",
1870 base::TimeTicks::Now() - beginning_time); 1870 base::TimeTicks::Now() - beginning_time);
1871 return true; 1871 return true;
1872 } 1872 }
1873 1873
1874 void RenderWidget::OnRepaint(const gfx::Size& size_to_paint) { 1874 void RenderWidget::OnRepaint(const gfx::Size& size_to_paint) {
1875 // During shutdown we can just ignore this message. 1875 // During shutdown we can just ignore this message.
1876 if (!webwidget_) 1876 if (!webwidget_)
1877 return; 1877 return;
1878 1878
1879 DCHECK(!size_to_paint.IsEmpty());
jamesr 2013/04/16 22:21:56 I'm hitting this on several mac tests: [13367:263
1880
1879 set_next_paint_is_repaint_ack(); 1881 set_next_paint_is_repaint_ack();
1880 if (is_accelerated_compositing_active_) { 1882 if (is_accelerated_compositing_active_ && compositor_) {
1881 if (compositor_) 1883 compositor_->SetNeedsRedrawRect(gfx::Rect(size_to_paint));
piman 2013/04/16 22:04:05 I'm curious - I thought setNeedsRedraw would force
1882 compositor_->setNeedsRedraw();
1883 scheduleComposite();
1884 } else { 1884 } else {
1885 gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height()); 1885 gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height());
1886 didInvalidateRect(repaint_rect); 1886 didInvalidateRect(repaint_rect);
1887 } 1887 }
1888 } 1888 }
1889 1889
1890 void RenderWidget::OnSmoothScrollCompleted(int gesture_id) { 1890 void RenderWidget::OnSmoothScrollCompleted(int gesture_id) {
1891 PendingSmoothScrollGestureMap::iterator it = 1891 PendingSmoothScrollGestureMap::iterator it =
1892 pending_smooth_scroll_gestures_.find(gesture_id); 1892 pending_smooth_scroll_gestures_.find(gesture_id);
1893 DCHECK(it != pending_smooth_scroll_gestures_.end()); 1893 DCHECK(it != pending_smooth_scroll_gestures_.end());
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 2311
2312 if (!context->Initialize( 2312 if (!context->Initialize(
2313 attributes, 2313 attributes,
2314 false /* bind generates resources */, 2314 false /* bind generates resources */,
2315 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2315 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2316 return NULL; 2316 return NULL;
2317 return context.release(); 2317 return context.release();
2318 } 2318 }
2319 2319
2320 } // namespace content 2320 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698