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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return memory_policy_.bytes_limit_when_visible; | 90 return memory_policy_.bytes_limit_when_visible; |
91 } | 91 } |
92 | 92 |
93 private: | 93 private: |
94 class SoftwareDevice; | 94 class SoftwareDevice; |
95 friend class SoftwareDevice; | 95 friend class SoftwareDevice; |
96 | 96 |
97 void InvokeComposite(const gfx::Transform& transform, | 97 void InvokeComposite(const gfx::Transform& transform, |
98 const gfx::Rect& viewport, | 98 const gfx::Rect& viewport, |
99 const gfx::Rect& clip, | 99 const gfx::Rect& clip, |
100 const gfx::Rect& viewport_rect_for_tile_priority, | |
101 const gfx::Transform& transform_for_tile_priority, | |
102 bool hardware_draw); | 100 bool hardware_draw); |
103 bool CalledOnValidThread() const; | 101 bool CalledOnValidThread() const; |
104 | 102 |
105 const int routing_id_; | 103 const int routing_id_; |
106 SynchronousCompositorRegistry* const registry_; // unowned | 104 SynchronousCompositorRegistry* const registry_; // unowned |
107 bool registered_; | 105 bool registered_; |
108 | 106 |
109 // Not owned. | 107 // Not owned. |
110 SynchronousCompositorOutputSurfaceClient* sync_client_; | 108 SynchronousCompositorOutputSurfaceClient* sync_client_; |
111 | 109 |
112 gfx::Transform cached_hw_transform_; | |
113 gfx::Rect cached_hw_viewport_; | |
114 gfx::Rect cached_hw_clip_; | |
115 gfx::Rect cached_hw_viewport_rect_for_tile_priority_; | |
116 gfx::Transform cached_hw_transform_for_tile_priority_; | |
117 bool next_hardware_draw_needs_damage_; | |
118 | |
119 // Only valid (non-NULL) during a DemandDrawSw() call. | 110 // Only valid (non-NULL) during a DemandDrawSw() call. |
120 SkCanvas* current_sw_canvas_; | 111 SkCanvas* current_sw_canvas_; |
121 | 112 |
122 cc::ManagedMemoryPolicy memory_policy_; | 113 cc::ManagedMemoryPolicy memory_policy_; |
123 | 114 |
124 scoped_ptr<cc::CompositorFrame> frame_holder_; | 115 scoped_ptr<cc::CompositorFrame> frame_holder_; |
125 | 116 |
126 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 117 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
127 | 118 |
128 base::ThreadChecker thread_checker_; | 119 base::ThreadChecker thread_checker_; |
129 | 120 |
130 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 121 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
131 }; | 122 }; |
132 | 123 |
133 } // namespace content | 124 } // namespace content |
134 | 125 |
135 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 126 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |