| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 8 #include <vector> |
| 9 |
| 7 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
| 8 #include "cc/surfaces/surface_factory.h" | 11 #include "cc/surfaces/surface_factory.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 12 #include "cc/surfaces/surface_manager.h" |
| 10 #include "cc/surfaces/surface_sequence.h" | 13 #include "cc/surfaces/surface_sequence.h" |
| 11 #include "content/browser/accessibility/browser_accessibility_manager.h" | 14 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 12 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 15 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 13 #include "content/browser/compositor/surface_utils.h" | 16 #include "content/browser/compositor/surface_utils.h" |
| 14 #include "content/browser/frame_host/cross_process_frame_connector.h" | 17 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 15 #include "content/browser/gpu/compositor_util.h" | 18 #include "content/browser/gpu/compositor_util.h" |
| 16 #include "content/browser/renderer_host/render_view_host_impl.h" | 19 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 413 |
| 411 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface( | 414 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface( |
| 412 const gfx::Rect& /* src_subrect */, | 415 const gfx::Rect& /* src_subrect */, |
| 413 const gfx::Size& /* dst_size */, | 416 const gfx::Size& /* dst_size */, |
| 414 const ReadbackRequestCallback& callback, | 417 const ReadbackRequestCallback& callback, |
| 415 const SkColorType /* preferred_color_type */) { | 418 const SkColorType /* preferred_color_type */) { |
| 416 callback.Run(SkBitmap(), READBACK_FAILED); | 419 callback.Run(SkBitmap(), READBACK_FAILED); |
| 417 } | 420 } |
| 418 | 421 |
| 419 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame( | 422 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame( |
| 420 const gfx::Rect& src_subrect, | 423 const gfx::Rect& src_subrect, |
| 421 const scoped_refptr<media::VideoFrame>& target, | 424 const scoped_refptr<media::VideoFrame>& target, |
| 422 const base::Callback<void(bool)>& callback) { | 425 const base::Callback<void(const gfx::Rect&, bool)>& callback) { |
| 423 NOTIMPLEMENTED(); | 426 NOTIMPLEMENTED(); |
| 424 callback.Run(false); | 427 callback.Run(gfx::Rect(), false); |
| 425 } | 428 } |
| 426 | 429 |
| 427 bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const { | 430 bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const { |
| 428 return false; | 431 return false; |
| 429 } | 432 } |
| 430 | 433 |
| 431 bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface( | 434 bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface( |
| 432 const gfx::Size& desired_size) { | 435 const gfx::Size& desired_size) { |
| 433 return false; | 436 return false; |
| 434 } | 437 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 479 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
| 477 } | 480 } |
| 478 | 481 |
| 479 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { | 482 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { |
| 480 if (surface_factory_ && !surface_id_.is_null()) | 483 if (surface_factory_ && !surface_id_.is_null()) |
| 481 surface_factory_->Destroy(surface_id_); | 484 surface_factory_->Destroy(surface_id_); |
| 482 surface_id_ = cc::SurfaceId(); | 485 surface_id_ = cc::SurfaceId(); |
| 483 } | 486 } |
| 484 | 487 |
| 485 } // namespace content | 488 } // namespace content |
| OLD | NEW |