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