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.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 bool RenderWidgetHostImpl::CopyFromBackingStore(skia::PlatformCanvas* output) { | 478 bool RenderWidgetHostImpl::CopyFromBackingStore(skia::PlatformCanvas* output) { |
479 BackingStore* backing_store = GetBackingStore(false); | 479 BackingStore* backing_store = GetBackingStore(false); |
480 if (!backing_store) | 480 if (!backing_store) |
481 return false; | 481 return false; |
482 | 482 |
483 return backing_store->CopyFromBackingStore( | 483 return backing_store->CopyFromBackingStore( |
484 gfx::Rect(backing_store->size()), output); | 484 gfx::Rect(backing_store->size()), output); |
485 } | 485 } |
486 | 486 |
| 487 #if !defined(OS_WIN) |
| 488 bool RenderWidgetHostImpl::CopyFromCompositingSurface( |
| 489 skia::PlatformCanvas* output) { |
| 490 // TODO(mazda): Implement this for other platforms. |
| 491 NOTIMPLEMENTED(); |
| 492 return false; |
| 493 } |
| 494 #endif |
| 495 |
487 #if defined(TOOLKIT_GTK) | 496 #if defined(TOOLKIT_GTK) |
488 bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow( | 497 bool RenderWidgetHostImpl::CopyFromBackingStoreToGtkWindow( |
489 const gfx::Rect& dest_rect, GdkWindow* target) { | 498 const gfx::Rect& dest_rect, GdkWindow* target) { |
490 BackingStore* backing_store = GetBackingStore(false); | 499 BackingStore* backing_store = GetBackingStore(false); |
491 if (!backing_store) | 500 if (!backing_store) |
492 return false; | 501 return false; |
493 (static_cast<BackingStoreGtk*>(backing_store))->PaintToRect( | 502 (static_cast<BackingStoreGtk*>(backing_store))->PaintToRect( |
494 dest_rect, target); | 503 dest_rect, target); |
495 return true; | 504 return true; |
496 } | 505 } |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); | 1631 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); |
1623 } | 1632 } |
1624 | 1633 |
1625 // static | 1634 // static |
1626 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, | 1635 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, |
1627 int gpu_host_id) { | 1636 int gpu_host_id) { |
1628 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1637 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
1629 if (ui_shim) | 1638 if (ui_shim) |
1630 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1639 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
1631 } | 1640 } |
OLD | NEW |