| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 base::Bind( | 52 base::Bind( |
| 53 &OffscreenCanvasCompositorFrameSink::DidReceiveCompositorFrameAck, | 53 &OffscreenCanvasCompositorFrameSink::DidReceiveCompositorFrameAck, |
| 54 base::Unretained(this))); | 54 base::Unretained(this))); |
| 55 } | 55 } |
| 56 | 56 |
| 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::AddSurfaceReferences( |
| 63 const std::vector<cc::SurfaceReference>& references) { |
| 64 NOTIMPLEMENTED(); |
| 65 } |
| 66 |
| 67 void OffscreenCanvasCompositorFrameSink::RemoveSurfaceReferences( |
| 68 const std::vector<cc::SurfaceReference>& references) { |
| 69 NOTIMPLEMENTED(); |
| 70 } |
| 71 |
| 62 void OffscreenCanvasCompositorFrameSink::EvictFrame() { | 72 void OffscreenCanvasCompositorFrameSink::EvictFrame() { |
| 63 // TODO(fsamuel, staraz): Implement this | 73 // TODO(fsamuel, staraz): Implement this |
| 64 NOTIMPLEMENTED(); | 74 NOTIMPLEMENTED(); |
| 65 } | 75 } |
| 66 | 76 |
| 67 void OffscreenCanvasCompositorFrameSink::ReturnResources( | 77 void OffscreenCanvasCompositorFrameSink::ReturnResources( |
| 68 const cc::ReturnedResourceArray& resources) { | 78 const cc::ReturnedResourceArray& resources) { |
| 69 if (resources.empty()) | 79 if (resources.empty()) |
| 70 return; | 80 return; |
| 71 | 81 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 91 client_->DidReceiveCompositorFrameAck(); | 101 client_->DidReceiveCompositorFrameAck(); |
| 92 DCHECK_GT(ack_pending_count_, 0); | 102 DCHECK_GT(ack_pending_count_, 0); |
| 93 if (!surface_returned_resources_.empty()) { | 103 if (!surface_returned_resources_.empty()) { |
| 94 client_->ReclaimResources(surface_returned_resources_); | 104 client_->ReclaimResources(surface_returned_resources_); |
| 95 surface_returned_resources_.clear(); | 105 surface_returned_resources_.clear(); |
| 96 } | 106 } |
| 97 ack_pending_count_--; | 107 ack_pending_count_--; |
| 98 } | 108 } |
| 99 | 109 |
| 100 } // namespace content | 110 } // namespace content |
| OLD | NEW |