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

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

Issue 8344021: Use WebCompositor only when --enable-threaded-compositing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Dont create thread Created 9 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
« no previous file with comments | « content/renderer/render_thread_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 // 2) Allows us to collect more damage rects before painting to help coalesce 918 // 2) Allows us to collect more damage rects before painting to help coalesce
919 // the work that we will need to do. 919 // the work that we will need to do.
920 invalidation_task_posted_ = true; 920 invalidation_task_posted_ = true;
921 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( 921 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
922 this, &RenderWidget::InvalidationCallback)); 922 this, &RenderWidget::InvalidationCallback));
923 } 923 }
924 924
925 void RenderWidget::didActivateCompositor(int compositor_identifier) { 925 void RenderWidget::didActivateCompositor(int compositor_identifier) {
926 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); 926 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
927 927
928 RenderThreadImpl::current()->compositor_thread()-> 928 CompositorThread* compositor_thread =
929 AddCompositor(routing_id_, compositor_identifier); 929 RenderThreadImpl::current()->compositor_thread();
930 if (compositor_thread)
jamesr 2011/10/20 22:51:52 in webkit we normally fold the assignment into the
darin (slow to review) 2011/10/21 05:03:35 I don't think there is a strong convention. It'd
931 compositor_thread->AddCompositor(routing_id_, compositor_identifier);
930 932
931 is_accelerated_compositing_active_ = true; 933 is_accelerated_compositing_active_ = true;
932 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( 934 Send(new ViewHostMsg_DidActivateAcceleratedCompositing(
933 routing_id_, is_accelerated_compositing_active_)); 935 routing_id_, is_accelerated_compositing_active_));
934 936
935 // Note: asynchronous swapbuffer support currently only matters if 937 // Note: asynchronous swapbuffer support currently only matters if
936 // compositing scheduling happens on the RenderWidget. 938 // compositing scheduling happens on the RenderWidget.
937 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers(); 939 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers();
938 } 940 }
939 941
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 } 1430 }
1429 } 1431 }
1430 1432
1431 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1433 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1432 return false; 1434 return false;
1433 } 1435 }
1434 1436
1435 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1437 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1436 return false; 1438 return false;
1437 } 1439 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698