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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 288633002: Remove renderer-side tracking of accelerated compositing (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 unified diff | Download patch | Annotate | Revision Log
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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) 468 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
469 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus) 469 IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus)
470 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur) 470 IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur)
471 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) 471 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled, 472 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled,
473 OnSetTouchEventEmulationEnabled) 473 OnSetTouchEventEmulationEnabled)
474 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged, 474 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
475 OnTextInputTypeChanged) 475 OnTextInputTypeChanged)
476 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition, 476 IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
477 OnImeCancelComposition) 477 OnImeCancelComposition)
478 IPC_MESSAGE_HANDLER(ViewHostMsg_DidActivateAcceleratedCompositing,
479 OnDidActivateAcceleratedCompositing)
480 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) 478 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse)
481 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) 479 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse)
482 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, 480 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup,
483 OnShowDisambiguationPopup) 481 OnShowDisambiguationPopup)
484 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged) 482 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnSelectionChanged)
485 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, 483 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged,
486 OnSelectionBoundsChanged) 484 OnSelectionBoundsChanged)
487 #if defined(OS_WIN) 485 #if defined(OS_WIN)
488 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated, 486 IPC_MESSAGE_HANDLER(ViewHostMsg_WindowlessPluginDummyWindowCreated,
489 OnWindowlessPluginDummyWindowCreated) 487 OnWindowlessPluginDummyWindowCreated)
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 if (view_) 1664 if (view_)
1667 view_->ImeCompositionRangeChanged(range, character_bounds); 1665 view_->ImeCompositionRangeChanged(range, character_bounds);
1668 } 1666 }
1669 #endif 1667 #endif
1670 1668
1671 void RenderWidgetHostImpl::OnImeCancelComposition() { 1669 void RenderWidgetHostImpl::OnImeCancelComposition() {
1672 if (view_) 1670 if (view_)
1673 view_->ImeCancelComposition(); 1671 view_->ImeCancelComposition();
1674 } 1672 }
1675 1673
1676 void RenderWidgetHostImpl::OnDidActivateAcceleratedCompositing(bool activated) {
1677 TRACE_EVENT1("renderer_host",
1678 "RenderWidgetHostImpl::OnDidActivateAcceleratedCompositing",
1679 "activated", activated);
1680 is_accelerated_compositing_active_ = activated;
1681 if (view_)
1682 view_->OnAcceleratedCompositingStateChange();
1683 }
1684
1685 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture, 1674 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture,
1686 bool last_unlocked_by_target, 1675 bool last_unlocked_by_target,
1687 bool privileged) { 1676 bool privileged) {
1688 1677
1689 if (pending_mouse_lock_request_) { 1678 if (pending_mouse_lock_request_) {
1690 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); 1679 Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
1691 return; 1680 return;
1692 } else if (IsMouseLocked()) { 1681 } else if (IsMouseLocked()) {
1693 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); 1682 Send(new ViewMsg_LockMouse_ACK(routing_id_, true));
1694 return; 1683 return;
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 } 2325 }
2337 } 2326 }
2338 2327
2339 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2328 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2340 if (view_) 2329 if (view_)
2341 return view_->PreferredReadbackFormat(); 2330 return view_->PreferredReadbackFormat();
2342 return SkBitmap::kARGB_8888_Config; 2331 return SkBitmap::kARGB_8888_Config;
2343 } 2332 }
2344 2333
2345 } // namespace content 2334 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698