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

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

Issue 615503004: Remove TextureImageTransportSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fixes Created 6 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
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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 962
963 void RenderWidgetHostViewAura::BeginFrameSubscription( 963 void RenderWidgetHostViewAura::BeginFrameSubscription(
964 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) { 964 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) {
965 delegated_frame_host_->BeginFrameSubscription(subscriber.Pass()); 965 delegated_frame_host_->BeginFrameSubscription(subscriber.Pass());
966 } 966 }
967 967
968 void RenderWidgetHostViewAura::EndFrameSubscription() { 968 void RenderWidgetHostViewAura::EndFrameSubscription() {
969 delegated_frame_host_->EndFrameSubscription(); 969 delegated_frame_host_->EndFrameSubscription();
970 } 970 }
971 971
972 void RenderWidgetHostViewAura::AcceleratedSurfaceInitialized(int host_id,
973 int route_id) {
974 }
975
976 #if defined(OS_WIN) 972 #if defined(OS_WIN)
977 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const { 973 bool RenderWidgetHostViewAura::UsesNativeWindowFrame() const {
978 return (legacy_render_widget_host_HWND_ != NULL); 974 return (legacy_render_widget_host_HWND_ != NULL);
979 } 975 }
980 976
981 void RenderWidgetHostViewAura::UpdateConstrainedWindowRects( 977 void RenderWidgetHostViewAura::UpdateConstrainedWindowRects(
982 const std::vector<gfx::Rect>& rects) { 978 const std::vector<gfx::Rect>& rects) {
983 // Check this before setting constrained_rects_, so that next time they're set 979 // Check this before setting constrained_rects_, so that next time they're set
984 // and we have a root window we don't early return. 980 // and we have a root window we don't early return.
985 if (!window_->GetHost()) 981 if (!window_->GetHost())
(...skipping 20 matching lines...) Expand all
1006 ::ClipCursor(&window_rect); 1002 ::ClipCursor(&window_rect);
1007 } 1003 }
1008 } 1004 }
1009 1005
1010 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() { 1006 void RenderWidgetHostViewAura::OnLegacyWindowDestroyed() {
1011 legacy_render_widget_host_HWND_ = NULL; 1007 legacy_render_widget_host_HWND_ = NULL;
1012 legacy_window_destroyed_ = true; 1008 legacy_window_destroyed_ = true;
1013 } 1009 }
1014 #endif 1010 #endif
1015 1011
1016 void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
1017 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
1018 int gpu_host_id) {
1019 // Oldschool composited mode is no longer supported.
1020 }
1021
1022 void RenderWidgetHostViewAura::OnSwapCompositorFrame( 1012 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
1023 uint32 output_surface_id, 1013 uint32 output_surface_id,
1024 scoped_ptr<cc::CompositorFrame> frame) { 1014 scoped_ptr<cc::CompositorFrame> frame) {
1025 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); 1015 TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
1026 1016
1027 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1017 last_scroll_offset_ = frame->metadata.root_scroll_offset;
1028 if (frame->delegated_frame_data) { 1018 if (frame->delegated_frame_data) {
1029 delegated_frame_host_->SwapDelegatedFrame( 1019 delegated_frame_host_->SwapDelegatedFrame(
1030 output_surface_id, 1020 output_surface_id,
1031 frame->delegated_frame_data.Pass(), 1021 frame->delegated_frame_data.Pass(),
(...skipping 24 matching lines...) Expand all
1056 gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin() 1046 gfx::NativeViewId RenderWidgetHostViewAura::GetParentForWindowlessPlugin()
1057 const { 1047 const {
1058 if (legacy_render_widget_host_HWND_) { 1048 if (legacy_render_widget_host_HWND_) {
1059 return reinterpret_cast<gfx::NativeViewId>( 1049 return reinterpret_cast<gfx::NativeViewId>(
1060 legacy_render_widget_host_HWND_->hwnd()); 1050 legacy_render_widget_host_HWND_->hwnd());
1061 } 1051 }
1062 return NULL; 1052 return NULL;
1063 } 1053 }
1064 #endif 1054 #endif
1065 1055
1066 void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
1067 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
1068 int gpu_host_id) {
1069 // Oldschool composited mode is no longer supported.
1070 }
1071
1072 void RenderWidgetHostViewAura::AcceleratedSurfaceSuspend() {
1073 }
1074
1075 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease() {
1076 }
1077
1078 bool RenderWidgetHostViewAura::HasAcceleratedSurface( 1056 bool RenderWidgetHostViewAura::HasAcceleratedSurface(
1079 const gfx::Size& desired_size) { 1057 const gfx::Size& desired_size) {
1080 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't 1058 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't
1081 // matter what is returned here as GetBackingStore is the only caller of this 1059 // matter what is returned here as GetBackingStore is the only caller of this
1082 // method. TODO(jbates) implement this if other Aura code needs it. 1060 // method. TODO(jbates) implement this if other Aura code needs it.
1083 return false; 1061 return false;
1084 } 1062 }
1085 1063
1086 void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) { 1064 void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) {
1087 GetScreenInfoForWindow(results, window_->GetRootWindow() ? window_ : NULL); 1065 GetScreenInfoForWindow(results, window_->GetRootWindow() ? window_ : NULL);
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 2569
2592 //////////////////////////////////////////////////////////////////////////////// 2570 ////////////////////////////////////////////////////////////////////////////////
2593 // RenderWidgetHostViewBase, public: 2571 // RenderWidgetHostViewBase, public:
2594 2572
2595 // static 2573 // static
2596 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2574 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2597 GetScreenInfoForWindow(results, NULL); 2575 GetScreenInfoForWindow(results, NULL);
2598 } 2576 }
2599 2577
2600 } // namespace content 2578 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698