| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // TODO(staraz): Implement this. | 80 // TODO(staraz): Implement this. |
| 81 NOTIMPLEMENTED(); | 81 NOTIMPLEMENTED(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void OffscreenCanvasCompositorFrameSink::Satisfy( | 84 void OffscreenCanvasCompositorFrameSink::Satisfy( |
| 85 const cc::SurfaceSequence& sequence) { | 85 const cc::SurfaceSequence& sequence) { |
| 86 // TODO(staraz): Implement this. | 86 // TODO(staraz): Implement this. |
| 87 NOTIMPLEMENTED(); | 87 NOTIMPLEMENTED(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void OffscreenCanvasCompositorFrameSink::BeginFrameDidNotDraw( |
| 91 const cc::BeginFrameAck& ack) { |
| 92 NOTIMPLEMENTED(); |
| 93 } |
| 94 |
| 90 void OffscreenCanvasCompositorFrameSink::ReturnResources( | 95 void OffscreenCanvasCompositorFrameSink::ReturnResources( |
| 91 const cc::ReturnedResourceArray& resources) { | 96 const cc::ReturnedResourceArray& resources) { |
| 92 if (resources.empty()) | 97 if (resources.empty()) |
| 93 return; | 98 return; |
| 94 | 99 |
| 95 if (!ack_pending_count_ && client_) { | 100 if (!ack_pending_count_ && client_) { |
| 96 client_->ReclaimResources(resources); | 101 client_->ReclaimResources(resources); |
| 97 return; | 102 return; |
| 98 } | 103 } |
| 99 | 104 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 114 client_->DidReceiveCompositorFrameAck(); | 119 client_->DidReceiveCompositorFrameAck(); |
| 115 DCHECK_GT(ack_pending_count_, 0); | 120 DCHECK_GT(ack_pending_count_, 0); |
| 116 if (!surface_returned_resources_.empty()) { | 121 if (!surface_returned_resources_.empty()) { |
| 117 client_->ReclaimResources(surface_returned_resources_); | 122 client_->ReclaimResources(surface_returned_resources_); |
| 118 surface_returned_resources_.clear(); | 123 surface_returned_resources_.clear(); |
| 119 } | 124 } |
| 120 ack_pending_count_--; | 125 ack_pending_count_--; |
| 121 } | 126 } |
| 122 | 127 |
| 123 } // namespace content | 128 } // namespace content |
| OLD | NEW |