| OLD | NEW |
| 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 const gfx::Size& desired_size) { | 971 const gfx::Size& desired_size) { |
| 972 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't | 972 // Aura doesn't use GetBackingStore for accelerated pages, so it doesn't |
| 973 // matter what is returned here as GetBackingStore is the only caller of this | 973 // matter what is returned here as GetBackingStore is the only caller of this |
| 974 // method. TODO(jbates) implement this if other Aura code needs it. | 974 // method. TODO(jbates) implement this if other Aura code needs it. |
| 975 return false; | 975 return false; |
| 976 } | 976 } |
| 977 | 977 |
| 978 // TODO(backer): Drop the |shm_handle| once I remove some unused service side | 978 // TODO(backer): Drop the |shm_handle| once I remove some unused service side |
| 979 // code. | 979 // code. |
| 980 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( | 980 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( |
| 981 int32 width_in_pixel, | |
| 982 int32 height_in_pixel, | |
| 983 uint64 surface_handle, | 981 uint64 surface_handle, |
| 984 const std::string& mailbox_name) { | 982 const std::string& mailbox_name) { |
| 985 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 983 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 986 scoped_refptr<ui::Texture> surface(factory->CreateTransportClient( | 984 scoped_refptr<ui::Texture> surface(factory->CreateTransportClient( |
| 987 gfx::Size(width_in_pixel, height_in_pixel), device_scale_factor_, | 985 gfx::Size(0, 0), device_scale_factor_, |
| 988 mailbox_name)); | 986 mailbox_name)); |
| 989 if (!surface) { | 987 if (!surface) { |
| 990 LOG(ERROR) << "Failed to create ImageTransport texture"; | 988 LOG(ERROR) << "Failed to create ImageTransport texture"; |
| 991 return; | 989 return; |
| 992 } | 990 } |
| 993 image_transport_clients_[surface_handle] = surface; | 991 image_transport_clients_[surface_handle] = surface; |
| 994 } | 992 } |
| 995 | 993 |
| 996 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease() { | 994 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease() { |
| 997 // This really tells us to release the frontbuffer. | 995 // This really tells us to release the frontbuffer. |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 RenderWidgetHost* widget) { | 1993 RenderWidgetHost* widget) { |
| 1996 return new RenderWidgetHostViewAura(widget); | 1994 return new RenderWidgetHostViewAura(widget); |
| 1997 } | 1995 } |
| 1998 | 1996 |
| 1999 // static | 1997 // static |
| 2000 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 1998 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2001 GetScreenInfoForWindow(results, NULL); | 1999 GetScreenInfoForWindow(results, NULL); |
| 2002 } | 2000 } |
| 2003 | 2001 |
| 2004 } // namespace content | 2002 } // namespace content |
| OLD | NEW |