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

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

Issue 9980016: Delete background tab IOSurfaces on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed auto-resize and fullscreen toggle Created 8 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/public/browser/render_process_host.h ('k') | content/test/mock_render_process_host.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_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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); 1074 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this));
1075 } 1075 }
1076 1076
1077 void RenderWidget::didAutoResize(const WebSize& new_size) { 1077 void RenderWidget::didAutoResize(const WebSize& new_size) {
1078 size_ = new_size; 1078 size_ = new_size;
1079 } 1079 }
1080 1080
1081 void RenderWidget::didActivateCompositor(int input_handler_identifier) { 1081 void RenderWidget::didActivateCompositor(int input_handler_identifier) {
1082 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); 1082 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
1083 1083
1084 #if !defined(OS_MACOSX)
1084 if (!is_accelerated_compositing_active_) { 1085 if (!is_accelerated_compositing_active_) {
1085 // When not in accelerated compositing mode, in certain cases (e.g. waiting 1086 // When not in accelerated compositing mode, in certain cases (e.g. waiting
1086 // for a resize or if no backing store) the RenderWidgetHost is blocking the 1087 // for a resize or if no backing store) the RenderWidgetHost is blocking the
1087 // browser's UI thread for some time, waiting for an UpdateRect. If we are 1088 // browser's UI thread for some time, waiting for an UpdateRect. If we are
1088 // going to switch to accelerated compositing, the GPU process may need 1089 // going to switch to accelerated compositing, the GPU process may need
1089 // round-trips to the browser's UI thread before finishing the frame, 1090 // round-trips to the browser's UI thread before finishing the frame,
1090 // causing deadlocks if we delay the UpdateRect until we receive the 1091 // causing deadlocks if we delay the UpdateRect until we receive the
1091 // OnSwapBuffersComplete. So send a dummy message that will unblock the 1092 // OnSwapBuffersComplete. So send a dummy message that will unblock the
1092 // browser's UI thread. 1093 // browser's UI thread. This is not necessary on Mac, because SwapBuffers
1094 // now unblocks GetBackingStore on Mac.
1093 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_)); 1095 Send(new ViewHostMsg_UpdateIsDelayed(routing_id_));
1094 } 1096 }
1097 #endif
1095 1098
1096 is_accelerated_compositing_active_ = true; 1099 is_accelerated_compositing_active_ = true;
1097 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( 1100 Send(new ViewHostMsg_DidActivateAcceleratedCompositing(
1098 routing_id_, is_accelerated_compositing_active_)); 1101 routing_id_, is_accelerated_compositing_active_));
1099 } 1102 }
1100 1103
1101 void RenderWidget::didDeactivateCompositor() { 1104 void RenderWidget::didDeactivateCompositor() {
1102 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor"); 1105 TRACE_EVENT0("gpu", "RenderWidget::didDeactivateCompositor");
1103 1106
1104 is_accelerated_compositing_active_ = false; 1107 is_accelerated_compositing_active_ = false;
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 } 1696 }
1694 } 1697 }
1695 1698
1696 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1699 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1697 return false; 1700 return false;
1698 } 1701 }
1699 1702
1700 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1703 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1701 return false; 1704 return false;
1702 } 1705 }
OLDNEW
« no previous file with comments | « content/public/browser/render_process_host.h ('k') | content/test/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698