| 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 // matter what is returned here as GetBackingStore is the only caller of this | 659 // matter what is returned here as GetBackingStore is the only caller of this |
| 660 // method. TODO(jbates) implement this if other Aura code needs it. | 660 // method. TODO(jbates) implement this if other Aura code needs it. |
| 661 return false; | 661 return false; |
| 662 } | 662 } |
| 663 | 663 |
| 664 // TODO(backer): Drop the |shm_handle| once I remove some unused service side | 664 // TODO(backer): Drop the |shm_handle| once I remove some unused service side |
| 665 // code. | 665 // code. |
| 666 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( | 666 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( |
| 667 int32 width_in_pixel, | 667 int32 width_in_pixel, |
| 668 int32 height_in_pixel, | 668 int32 height_in_pixel, |
| 669 uint64* surface_handle, | 669 uint64 surface_handle) { |
| 670 TransportDIB::Handle* shm_handle) { | |
| 671 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 670 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 672 scoped_refptr<ui::Texture> surface(factory->CreateTransportClient( | 671 scoped_refptr<ui::Texture> surface(factory->CreateTransportClient( |
| 673 gfx::Size(width_in_pixel, height_in_pixel), surface_handle, | 672 gfx::Size(width_in_pixel, height_in_pixel), surface_handle, |
| 674 GetCompositor())); | 673 GetCompositor())); |
| 675 if (!surface) { | 674 if (!surface) { |
| 676 LOG(ERROR) << "Failed to create ImageTransport texture"; | 675 LOG(ERROR) << "Failed to create ImageTransport texture"; |
| 677 return; | 676 return; |
| 678 } | 677 } |
| 679 | 678 |
| 680 image_transport_clients_[*surface_handle] = surface; | 679 image_transport_clients_[surface_handle] = surface; |
| 681 } | 680 } |
| 682 | 681 |
| 683 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease( | 682 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease( |
| 684 uint64 surface_handle) { | 683 uint64 surface_handle) { |
| 685 if (current_surface_ == surface_handle) { | 684 if (current_surface_ == surface_handle) { |
| 686 current_surface_ = 0; | 685 current_surface_ = 0; |
| 687 UpdateExternalTexture(); | 686 UpdateExternalTexture(); |
| 688 } | 687 } |
| 689 image_transport_clients_.erase(surface_handle); | 688 image_transport_clients_.erase(surface_handle); |
| 690 } | 689 } |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( | 1472 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( |
| 1474 RenderWidgetHost* widget) { | 1473 RenderWidgetHost* widget) { |
| 1475 return new RenderWidgetHostViewAura(widget); | 1474 return new RenderWidgetHostViewAura(widget); |
| 1476 } | 1475 } |
| 1477 | 1476 |
| 1478 // static | 1477 // static |
| 1479 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( | 1478 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 1480 WebKit::WebScreenInfo* results) { | 1479 WebKit::WebScreenInfo* results) { |
| 1481 GetScreenInfoForWindow(results, NULL); | 1480 GetScreenInfoForWindow(results, NULL); |
| 1482 } | 1481 } |
| OLD | NEW |