| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (client_) | 73 if (client_) |
| 74 client_->OnBeginFrame(args); | 74 client_->OnBeginFrame(args); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void OffscreenCanvasCompositorFrameSink::ReclaimResources( | 77 void OffscreenCanvasCompositorFrameSink::ReclaimResources( |
| 78 const cc::ReturnedResourceArray& resources) { | 78 const cc::ReturnedResourceArray& resources) { |
| 79 if (client_) | 79 if (client_) |
| 80 client_->ReclaimResources(resources); | 80 client_->ReclaimResources(resources); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void OffscreenCanvasCompositorFrameSink::WillDrawSurface() { | 83 void OffscreenCanvasCompositorFrameSink::WillDrawSurface( |
| 84 const cc::LocalSurfaceId& local_surface_id, |
| 85 const gfx::Rect& damage_rect) { |
| 84 if (client_) | 86 if (client_) |
| 85 client_->WillDrawSurface(); | 87 client_->WillDrawSurface(local_surface_id, damage_rect); |
| 86 } | 88 } |
| 87 | 89 |
| 88 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() { | 90 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() { |
| 89 provider_->OnCompositorFrameSinkClientConnectionLost( | 91 provider_->OnCompositorFrameSinkClientConnectionLost( |
| 90 support_.frame_sink_id()); | 92 support_.frame_sink_id()); |
| 91 } | 93 } |
| 92 | 94 |
| 93 } // namespace content | 95 } // namespace content |
| OLD | NEW |