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

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

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct base Created 8 years, 3 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_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 uint64 surface_handle) { 854 uint64 surface_handle) {
855 DCHECK(image_transport_clients_.find(surface_handle) != 855 DCHECK(image_transport_clients_.find(surface_handle) !=
856 image_transport_clients_.end()); 856 image_transport_clients_.end());
857 if (current_surface_ == surface_handle) { 857 if (current_surface_ == surface_handle) {
858 current_surface_ = 0; 858 current_surface_ = 0;
859 UpdateExternalTexture(); 859 UpdateExternalTexture();
860 } 860 }
861 image_transport_clients_.erase(surface_handle); 861 image_transport_clients_.erase(surface_handle);
862 } 862 }
863 863
864 void RenderWidgetHostViewAura::SwapCompositorFrame(
865 const WebKit::WebCompositorFrame& frame) {
866 ui::Compositor* compositor = GetCompositor();
867 if (!compositor) {
868 SwapCompositorFrameAck(NULL);
869 } else {
870 on_compositing_did_commit_callbacks_.push_back(
871 base::Bind(&RenderWidgetHostViewAura::SwapCompositorFrameAck,
872 base::Unretained(this)));
873 if (!compositor->HasObserver(this))
874 compositor->AddObserver(this);
875 compositor->ScheduleDraw();
876 }
877 }
878
879 void RenderWidgetHostViewAura::SwapCompositorFrameAck(ui::Compositor*) {
880 WebKit::WebCompositorFrameAck ack;
881 host_->SwapCompositorFrameAck(ack);
882 }
883
864 void RenderWidgetHostViewAura::SetSurfaceNotInUseByCompositor(ui::Compositor*) { 884 void RenderWidgetHostViewAura::SetSurfaceNotInUseByCompositor(ui::Compositor*) {
865 if (current_surface_ || !host_->is_hidden()) 885 if (current_surface_ || !host_->is_hidden())
866 return; 886 return;
867 current_surface_in_use_by_compositor_ = false; 887 current_surface_in_use_by_compositor_ = false;
868 AdjustSurfaceProtection(); 888 AdjustSurfaceProtection();
869 } 889 }
870 890
871 void RenderWidgetHostViewAura::AdjustSurfaceProtection() { 891 void RenderWidgetHostViewAura::AdjustSurfaceProtection() {
872 // If the current surface is non null, it is protected. 892 // If the current surface is non null, it is protected.
873 // If we are visible, it is protected. 893 // If we are visible, it is protected.
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 RenderWidgetHost* widget) { 1776 RenderWidgetHost* widget) {
1757 return new RenderWidgetHostViewAura(widget); 1777 return new RenderWidgetHostViewAura(widget);
1758 } 1778 }
1759 1779
1760 // static 1780 // static
1761 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 1781 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
1762 GetScreenInfoForWindow(results, NULL); 1782 GetScreenInfoForWindow(results, NULL);
1763 } 1783 }
1764 1784
1765 } // namespace content 1785 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698