OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/offscreen_canvas_compositor_frame_sink.h
" | 5 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
10 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" | 10 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p
rovider_impl.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 void OffscreenCanvasCompositorFrameSink::BeginFrameDidNotSwap( | 51 void OffscreenCanvasCompositorFrameSink::BeginFrameDidNotSwap( |
52 const cc::BeginFrameAck& begin_frame_ack) { | 52 const cc::BeginFrameAck& begin_frame_ack) { |
53 support_.BeginFrameDidNotSwap(begin_frame_ack); | 53 support_.BeginFrameDidNotSwap(begin_frame_ack); |
54 } | 54 } |
55 | 55 |
56 void OffscreenCanvasCompositorFrameSink::EvictFrame() { | 56 void OffscreenCanvasCompositorFrameSink::EvictFrame() { |
57 support_.EvictFrame(); | 57 support_.EvictFrame(); |
58 } | 58 } |
59 | 59 |
60 void OffscreenCanvasCompositorFrameSink::DidReceiveCompositorFrameAck() { | 60 void OffscreenCanvasCompositorFrameSink::DidReceiveCompositorFrameAck( |
| 61 const cc::ReturnedResourceArray& resources) { |
61 if (client_) | 62 if (client_) |
62 client_->DidReceiveCompositorFrameAck(); | 63 client_->DidReceiveCompositorFrameAck(resources); |
63 } | 64 } |
64 | 65 |
65 void OffscreenCanvasCompositorFrameSink::OnBeginFrame( | 66 void OffscreenCanvasCompositorFrameSink::OnBeginFrame( |
66 const cc::BeginFrameArgs& args) { | 67 const cc::BeginFrameArgs& args) { |
67 if (client_) | 68 if (client_) |
68 client_->OnBeginFrame(args); | 69 client_->OnBeginFrame(args); |
69 } | 70 } |
70 | 71 |
71 void OffscreenCanvasCompositorFrameSink::ReclaimResources( | 72 void OffscreenCanvasCompositorFrameSink::ReclaimResources( |
72 const cc::ReturnedResourceArray& resources) { | 73 const cc::ReturnedResourceArray& resources) { |
73 if (client_) | 74 if (client_) |
74 client_->ReclaimResources(resources); | 75 client_->ReclaimResources(resources); |
75 } | 76 } |
76 | 77 |
77 void OffscreenCanvasCompositorFrameSink::WillDrawSurface( | 78 void OffscreenCanvasCompositorFrameSink::WillDrawSurface( |
78 const cc::LocalSurfaceId& local_surface_id, | 79 const cc::LocalSurfaceId& local_surface_id, |
79 const gfx::Rect& damage_rect) {} | 80 const gfx::Rect& damage_rect) {} |
80 | 81 |
81 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() { | 82 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() { |
82 provider_->OnCompositorFrameSinkClientConnectionLost( | 83 provider_->OnCompositorFrameSinkClientConnectionLost( |
83 support_.frame_sink_id()); | 84 support_.frame_sink_id()); |
84 } | 85 } |
85 | 86 |
86 } // namespace content | 87 } // namespace content |
OLD | NEW |