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 <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
19 #include "cc/output/compositor_frame.h" | 19 #include "cc/output/compositor_frame.h" |
20 #include "cc/output/managed_memory_policy.h" | 20 #include "cc/output/managed_memory_policy.h" |
21 #include "cc/output/output_surface.h" | 21 #include "cc/output/output_surface.h" |
22 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
23 #include "ui/gfx/transform.h" | 23 #include "ui/gfx/transform.h" |
24 | 24 |
25 namespace cc { | 25 namespace cc { |
26 class ContextProvider; | 26 class ContextProvider; |
27 class CompositorFrameMetadata; | 27 class CompositorFrameMetadata; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 const gfx::Transform& transform, | 83 const gfx::Transform& transform, |
84 const gfx::Rect& viewport, | 84 const gfx::Rect& viewport, |
85 const gfx::Rect& clip, | 85 const gfx::Rect& clip, |
86 const gfx::Rect& viewport_rect_for_tile_priority, | 86 const gfx::Rect& viewport_rect_for_tile_priority, |
87 const gfx::Transform& transform_for_tile_priority); | 87 const gfx::Transform& transform_for_tile_priority); |
88 void ReturnResources(uint32_t output_surface_id, | 88 void ReturnResources(uint32_t output_surface_id, |
89 const cc::CompositorFrameAck& frame_ack); | 89 const cc::CompositorFrameAck& frame_ack); |
90 void DemandDrawSw(SkCanvas* canvas); | 90 void DemandDrawSw(SkCanvas* canvas); |
91 void SetMemoryPolicy(size_t bytes_limit); | 91 void SetMemoryPolicy(size_t bytes_limit); |
92 void SetTreeActivationCallback(const base::Closure& callback); | 92 void SetTreeActivationCallback(const base::Closure& callback); |
93 void GetMessagesToDeliver(std::vector<scoped_ptr<IPC::Message>>* messages); | 93 void GetMessagesToDeliver( |
| 94 std::vector<std::unique_ptr<IPC::Message>>* messages); |
94 | 95 |
95 size_t GetMemoryPolicy() const { | 96 size_t GetMemoryPolicy() const { |
96 return memory_policy_.bytes_limit_when_visible; | 97 return memory_policy_.bytes_limit_when_visible; |
97 } | 98 } |
98 | 99 |
99 private: | 100 private: |
100 class SoftwareDevice; | 101 class SoftwareDevice; |
101 friend class SoftwareDevice; | 102 friend class SoftwareDevice; |
102 | 103 |
103 void InvokeComposite(const gfx::Transform& transform, | 104 void InvokeComposite(const gfx::Transform& transform, |
(...skipping 25 matching lines...) Expand all Loading... |
129 bool fallback_tick_running_; | 130 bool fallback_tick_running_; |
130 | 131 |
131 base::ThreadChecker thread_checker_; | 132 base::ThreadChecker thread_checker_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 134 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace content | 137 } // namespace content |
137 | 138 |
138 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 139 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |