Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 const gfx::Rect& clip, | 97 const gfx::Rect& clip, |
| 98 const gfx::Rect& viewport_rect_for_tile_priority, | 98 const gfx::Rect& viewport_rect_for_tile_priority, |
| 99 const gfx::Transform& transform_for_tile_priority); | 99 const gfx::Transform& transform_for_tile_priority); |
| 100 void DemandDrawSw(SkCanvas* canvas); | 100 void DemandDrawSw(SkCanvas* canvas); |
| 101 | 101 |
| 102 // SurfaceFactoryClient implementation. | 102 // SurfaceFactoryClient implementation. |
| 103 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 103 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 104 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | 104 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 class SoftwareOutputSurface; | |
| 108 | |
| 107 void InvokeComposite(const gfx::Transform& transform, | 109 void InvokeComposite(const gfx::Transform& transform, |
| 108 const gfx::Rect& viewport, | 110 const gfx::Rect& viewport, |
| 109 const gfx::Rect& clip); | 111 const gfx::Rect& clip); |
| 110 bool Send(IPC::Message* message); | 112 bool Send(IPC::Message* message); |
| 111 void DidActivatePendingTree(); | 113 void DidActivatePendingTree(); |
| 112 void DeliverMessages(); | 114 void DeliverMessages(); |
| 113 bool CalledOnValidThread() const; | 115 bool CalledOnValidThread() const; |
| 114 | 116 |
| 115 void CancelFallbackTick(); | 117 void CancelFallbackTick(); |
| 116 void FallbackTickFired(); | 118 void FallbackTickFired(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface | 152 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface |
| 151 // is owned/destroyed on the compositor thread. | 153 // is owned/destroyed on the compositor thread. |
| 152 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 154 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
| 153 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 155 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
| 154 cc::SurfaceId delegated_surface_id_; | 156 cc::SurfaceId delegated_surface_id_; |
| 155 // Uses surface_manager_. | 157 // Uses surface_manager_. |
| 156 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 158 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 157 StubDisplayClient display_client_; | 159 StubDisplayClient display_client_; |
| 158 // Uses surface_manager_. | 160 // Uses surface_manager_. |
| 159 std::unique_ptr<cc::Display> display_; | 161 std::unique_ptr<cc::Display> display_; |
| 162 SoftwareOutputSurface* software_output_surface_; // Owned by |display_|. | |
|
danakj
2016/07/27 21:28:36
= nullptr here instead of in constructor?
boliu
2016/07/27 21:43:04
Done.
| |
| 160 | 163 |
| 161 base::ThreadChecker thread_checker_; | 164 base::ThreadChecker thread_checker_; |
| 162 | 165 |
| 163 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 166 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 164 }; | 167 }; |
| 165 | 168 |
| 166 } // namespace content | 169 } // namespace content |
| 167 | 170 |
| 168 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 171 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |