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