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_FRAME_SINK_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ |
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // IPC handlers. | 113 // IPC handlers. |
114 void SetMemoryPolicy(size_t bytes_limit); | 114 void SetMemoryPolicy(size_t bytes_limit); |
115 void OnReclaimResources(uint32_t compositor_frame_sink_id, | 115 void OnReclaimResources(uint32_t compositor_frame_sink_id, |
116 const cc::ReturnedResourceArray& resources); | 116 const cc::ReturnedResourceArray& resources); |
117 | 117 |
118 const int routing_id_; | 118 const int routing_id_; |
119 const uint32_t compositor_frame_sink_id_; | 119 const uint32_t compositor_frame_sink_id_; |
120 SynchronousCompositorRegistry* const registry_; // Not owned. | 120 SynchronousCompositorRegistry* const registry_; // Not owned. |
121 IPC::Sender* const sender_; // Not owned. | 121 IPC::Sender* const sender_; // Not owned. |
122 bool registered_ = false; | |
123 | 122 |
124 // Not owned. | 123 // Not owned. |
125 SynchronousCompositorFrameSinkClient* sync_client_ = nullptr; | 124 SynchronousCompositorFrameSinkClient* sync_client_ = nullptr; |
126 | 125 |
127 // Only valid (non-NULL) during a DemandDrawSw() call. | 126 // Only valid (non-NULL) during a DemandDrawSw() call. |
128 SkCanvas* current_sw_canvas_ = nullptr; | 127 SkCanvas* current_sw_canvas_ = nullptr; |
129 | 128 |
130 cc::ManagedMemoryPolicy memory_policy_; | 129 cc::ManagedMemoryPolicy memory_policy_; |
131 bool in_software_draw_ = false; | 130 bool in_software_draw_ = false; |
132 bool did_swap_ = false; | 131 bool did_swap_ = false; |
(...skipping 29 matching lines...) Expand all Loading... |
162 gfx::Rect sw_viewport_for_current_draw_; | 161 gfx::Rect sw_viewport_for_current_draw_; |
163 | 162 |
164 base::ThreadChecker thread_checker_; | 163 base::ThreadChecker thread_checker_; |
165 | 164 |
166 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink); | 165 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink); |
167 }; | 166 }; |
168 | 167 |
169 } // namespace content | 168 } // namespace content |
170 | 169 |
171 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ | 170 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ |
OLD | NEW |