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_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 gfx::Rect viewport, | 72 gfx::Rect viewport, |
73 gfx::Rect clip, | 73 gfx::Rect clip, |
74 bool stencil_enabled); | 74 bool stencil_enabled); |
75 bool DemandDrawSw(SkCanvas* canvas); | 75 bool DemandDrawSw(SkCanvas* canvas); |
76 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); | 76 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); |
77 | 77 |
78 private: | 78 private: |
79 class SoftwareDevice; | 79 class SoftwareDevice; |
80 friend class SoftwareDevice; | 80 friend class SoftwareDevice; |
81 | 81 |
82 // Private OutputSurface overrides. | |
83 virtual void PostCheckForRetroactiveBeginFrame() OVERRIDE; | |
84 | |
85 void InvokeComposite(const gfx::Transform& transform, | 82 void InvokeComposite(const gfx::Transform& transform, |
86 gfx::Rect viewport, | 83 gfx::Rect viewport, |
87 gfx::Rect clip, | 84 gfx::Rect clip, |
88 bool valid_for_tile_management); | 85 bool valid_for_tile_management); |
89 bool CalledOnValidThread() const; | 86 bool CalledOnValidThread() const; |
90 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); | 87 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); |
91 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); | 88 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); |
92 | 89 |
93 int routing_id_; | 90 int routing_id_; |
| 91 bool needs_begin_frame_; |
94 bool invoking_composite_; | 92 bool invoking_composite_; |
95 bool did_swap_buffer_; | 93 bool did_swap_buffer_; |
96 | 94 |
97 gfx::Transform cached_hw_transform_; | 95 gfx::Transform cached_hw_transform_; |
98 gfx::Rect cached_hw_viewport_; | 96 gfx::Rect cached_hw_viewport_; |
99 gfx::Rect cached_hw_clip_; | 97 gfx::Rect cached_hw_clip_; |
100 | 98 |
101 // Only valid (non-NULL) during a DemandDrawSw() call. | 99 // Only valid (non-NULL) during a DemandDrawSw() call. |
102 SkCanvas* current_sw_canvas_; | 100 SkCanvas* current_sw_canvas_; |
103 | 101 |
104 cc::ManagedMemoryPolicy memory_policy_; | 102 cc::ManagedMemoryPolicy memory_policy_; |
105 | 103 |
106 cc::OutputSurfaceClient* output_surface_client_; | 104 cc::OutputSurfaceClient* output_surface_client_; |
107 | 105 |
108 base::WeakPtrFactory<SynchronousCompositorOutputSurface> weak_ptr_factory_; | 106 base::WeakPtrFactory<SynchronousCompositorOutputSurface> weak_ptr_factory_; |
109 | 107 |
110 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 108 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
111 }; | 109 }; |
112 | 110 |
113 } // namespace content | 111 } // namespace content |
114 | 112 |
115 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 113 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
OLD | NEW |