| 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 <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/cancelable_callback.h" |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
| 18 #include "cc/output/compositor_frame.h" | 19 #include "cc/output/compositor_frame.h" |
| 19 #include "cc/output/managed_memory_policy.h" | 20 #include "cc/output/managed_memory_policy.h" |
| 20 #include "cc/output/output_surface.h" | 21 #include "cc/output/output_surface.h" |
| 21 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
| 22 #include "ui/gfx/transform.h" | 23 #include "ui/gfx/transform.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 private: | 97 private: |
| 97 class SoftwareDevice; | 98 class SoftwareDevice; |
| 98 friend class SoftwareDevice; | 99 friend class SoftwareDevice; |
| 99 | 100 |
| 100 void InvokeComposite(const gfx::Transform& transform, | 101 void InvokeComposite(const gfx::Transform& transform, |
| 101 const gfx::Rect& viewport, | 102 const gfx::Rect& viewport, |
| 102 const gfx::Rect& clip, | 103 const gfx::Rect& clip, |
| 103 bool hardware_draw); | 104 bool hardware_draw); |
| 104 bool CalledOnValidThread() const; | 105 bool CalledOnValidThread() const; |
| 105 | 106 |
| 107 void FallbackTickFired(); |
| 108 |
| 106 const int routing_id_; | 109 const int routing_id_; |
| 107 SynchronousCompositorRegistry* const registry_; // unowned | 110 SynchronousCompositorRegistry* const registry_; // unowned |
| 108 bool registered_; | 111 bool registered_; |
| 109 | 112 |
| 110 // Not owned. | 113 // Not owned. |
| 111 SynchronousCompositorOutputSurfaceClient* sync_client_; | 114 SynchronousCompositorOutputSurfaceClient* sync_client_; |
| 112 | 115 |
| 113 // Only valid (non-NULL) during a DemandDrawSw() call. | 116 // Only valid (non-NULL) during a DemandDrawSw() call. |
| 114 SkCanvas* current_sw_canvas_; | 117 SkCanvas* current_sw_canvas_; |
| 115 | 118 |
| 116 cc::ManagedMemoryPolicy memory_policy_; | 119 cc::ManagedMemoryPolicy memory_policy_; |
| 117 bool did_swap_; | 120 bool did_swap_; |
| 118 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 121 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 119 | 122 |
| 123 base::CancelableClosure fallback_tick_; |
| 124 |
| 120 base::ThreadChecker thread_checker_; | 125 base::ThreadChecker thread_checker_; |
| 121 | 126 |
| 122 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 127 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 123 }; | 128 }; |
| 124 | 129 |
| 125 } // namespace content | 130 } // namespace content |
| 126 | 131 |
| 127 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 132 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |