Chromium Code Reviews| 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_surface_impl.h" | 5 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.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/compositor/surface_utils.h" | 10 #include "content/browser/compositor/surface_utils.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 surface->AddDestructionDependency(sequence); | 67 surface->AddDestructionDependency(sequence); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void OffscreenCanvasSurfaceImpl::Satisfy(const cc::SurfaceSequence& sequence) { | 70 void OffscreenCanvasSurfaceImpl::Satisfy(const cc::SurfaceSequence& sequence) { |
| 71 std::vector<uint32_t> sequences; | 71 std::vector<uint32_t> sequences; |
| 72 sequences.push_back(sequence.sequence); | 72 sequences.push_back(sequence.sequence); |
| 73 cc::SurfaceManager* manager = GetSurfaceManager(); | 73 cc::SurfaceManager* manager = GetSurfaceManager(); |
| 74 manager->DidSatisfySequences(sequence.client_id, &sequences); | 74 manager->DidSatisfySequences(sequence.client_id, &sequences); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void OffscreenCanvasSurfaceImpl::SubmitCompositorFrame( | |
| 78 cc::CompositorFrame frame) { | |
| 79 // TODO(563852): Implement OffscreenCanvas commit flow. | |
|
dcheng
2016/08/29 20:10:37
Can we just put this change in the CL that impleme
xlai (Olivia)
2016/08/29 21:43:11
No problems. Since I have already found that the p
| |
| 80 } | |
| 81 | |
| 77 // TODO(619136): Implement cc::SurfaceFactoryClient functions for resources | 82 // TODO(619136): Implement cc::SurfaceFactoryClient functions for resources |
| 78 // return. | 83 // return. |
| 79 void OffscreenCanvasSurfaceImpl::ReturnResources( | 84 void OffscreenCanvasSurfaceImpl::ReturnResources( |
| 80 const cc::ReturnedResourceArray& resources) {} | 85 const cc::ReturnedResourceArray& resources) {} |
| 81 | 86 |
| 82 void OffscreenCanvasSurfaceImpl::WillDrawSurface(const cc::SurfaceId& id, | 87 void OffscreenCanvasSurfaceImpl::WillDrawSurface(const cc::SurfaceId& id, |
| 83 const gfx::Rect& damage_rect) { | 88 const gfx::Rect& damage_rect) { |
| 84 } | 89 } |
| 85 | 90 |
| 86 void OffscreenCanvasSurfaceImpl::SetBeginFrameSource( | 91 void OffscreenCanvasSurfaceImpl::SetBeginFrameSource( |
| 87 cc::BeginFrameSource* begin_frame_source) {} | 92 cc::BeginFrameSource* begin_frame_source) {} |
| 88 | 93 |
| 89 } // namespace content | 94 } // namespace content |
| OLD | NEW |