Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_output_surface.h

Issue 221833009: cc: Move scheduling logic out of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@swapAck2Sched11
Patch Set: rebase; add comment about race Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 gfx::Rect viewport, 71 gfx::Rect viewport,
72 gfx::Rect clip, 72 gfx::Rect clip,
73 bool stencil_enabled); 73 bool stencil_enabled);
74 bool DemandDrawSw(SkCanvas* canvas); 74 bool DemandDrawSw(SkCanvas* canvas);
75 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); 75 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy);
76 76
77 private: 77 private:
78 class SoftwareDevice; 78 class SoftwareDevice;
79 friend class SoftwareDevice; 79 friend class SoftwareDevice;
80 80
81 // Private OutputSurface overrides.
82 virtual void PostCheckForRetroactiveBeginFrame() OVERRIDE;
83
84 void InvokeComposite(const gfx::Transform& transform, 81 void InvokeComposite(const gfx::Transform& transform,
85 gfx::Rect viewport, 82 gfx::Rect viewport,
86 gfx::Rect clip, 83 gfx::Rect clip,
87 bool valid_for_tile_management); 84 bool valid_for_tile_management);
88 bool CalledOnValidThread() const; 85 bool CalledOnValidThread() const;
89 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); 86 SynchronousCompositorOutputSurfaceDelegate* GetDelegate();
90 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); 87 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info);
91 88
92 int routing_id_; 89 int routing_id_;
90 bool needs_begin_frame_;
93 bool invoking_composite_; 91 bool invoking_composite_;
94 bool did_swap_buffer_; 92 bool did_swap_buffer_;
95 93
96 gfx::Transform cached_hw_transform_; 94 gfx::Transform cached_hw_transform_;
97 gfx::Rect cached_hw_viewport_; 95 gfx::Rect cached_hw_viewport_;
98 gfx::Rect cached_hw_clip_; 96 gfx::Rect cached_hw_clip_;
99 97
100 // Only valid (non-NULL) during a DemandDrawSw() call. 98 // Only valid (non-NULL) during a DemandDrawSw() call.
101 SkCanvas* current_sw_canvas_; 99 SkCanvas* current_sw_canvas_;
102 100
103 cc::ManagedMemoryPolicy memory_policy_; 101 cc::ManagedMemoryPolicy memory_policy_;
104 102
105 cc::OutputSurfaceClient* output_surface_client_; 103 cc::OutputSurfaceClient* output_surface_client_;
106 104
107 base::WeakPtrFactory<SynchronousCompositorOutputSurface> weak_ptr_factory_; 105 base::WeakPtrFactory<SynchronousCompositorOutputSurface> weak_ptr_factory_;
108 106
109 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 107 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
110 }; 108 };
111 109
112 } // namespace content 110 } // namespace content
113 111
114 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_ 112 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/android/in_process/synchronous_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698