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 "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
8 #include "cc/surfaces/surface_manager.h" | 8 #include "cc/surfaces/surface_manager.h" |
9 #include "content/browser/compositor/surface_utils.h" | 9 #include "content/browser/compositor/surface_utils.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void OffscreenCanvasCompositorFrameSink::SetNeedsBeginFrame( | 57 void OffscreenCanvasCompositorFrameSink::SetNeedsBeginFrame( |
58 bool needs_begin_frame) { | 58 bool needs_begin_frame) { |
59 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
60 } | 60 } |
61 | 61 |
62 void OffscreenCanvasCompositorFrameSink::EvictFrame() { | 62 void OffscreenCanvasCompositorFrameSink::EvictFrame() { |
63 // TODO(fsamuel, staraz): Implement this | 63 // TODO(fsamuel, staraz): Implement this |
64 NOTIMPLEMENTED(); | 64 NOTIMPLEMENTED(); |
65 } | 65 } |
66 | 66 |
| 67 void OffscreenCanvasCompositorFrameSink::Require( |
| 68 const cc::LocalFrameId& local_frame_id, |
| 69 const cc::SurfaceSequence& sequence) { |
| 70 // TODO(staraz): Implement this. |
| 71 NOTIMPLEMENTED(); |
| 72 } |
| 73 |
| 74 void OffscreenCanvasCompositorFrameSink::Satisfy( |
| 75 const cc::SurfaceSequence& sequence) { |
| 76 // TODO(staraz): Implement this. |
| 77 NOTIMPLEMENTED(); |
| 78 } |
| 79 |
67 void OffscreenCanvasCompositorFrameSink::ReturnResources( | 80 void OffscreenCanvasCompositorFrameSink::ReturnResources( |
68 const cc::ReturnedResourceArray& resources) { | 81 const cc::ReturnedResourceArray& resources) { |
69 if (resources.empty()) | 82 if (resources.empty()) |
70 return; | 83 return; |
71 | 84 |
72 if (!ack_pending_count_ && client_) { | 85 if (!ack_pending_count_ && client_) { |
73 client_->ReclaimResources(resources); | 86 client_->ReclaimResources(resources); |
74 return; | 87 return; |
75 } | 88 } |
76 | 89 |
(...skipping 14 matching lines...) Expand all Loading... |
91 client_->DidReceiveCompositorFrameAck(); | 104 client_->DidReceiveCompositorFrameAck(); |
92 DCHECK_GT(ack_pending_count_, 0); | 105 DCHECK_GT(ack_pending_count_, 0); |
93 if (!surface_returned_resources_.empty()) { | 106 if (!surface_returned_resources_.empty()) { |
94 client_->ReclaimResources(surface_returned_resources_); | 107 client_->ReclaimResources(surface_returned_resources_); |
95 surface_returned_resources_.clear(); | 108 surface_returned_resources_.clear(); |
96 } | 109 } |
97 ack_pending_count_--; | 110 ack_pending_count_--; |
98 } | 111 } |
99 | 112 |
100 } // namespace content | 113 } // namespace content |
OLD | NEW |