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

Side by Side Diff: content/browser/compositor/delegated_frame_host.h

Issue 1016033006: Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable BeginFrame scheduling under flag Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
7 7
8 #include "cc/layers/delegated_frame_provider.h" 8 #include "cc/layers/delegated_frame_provider.h"
9 #include "cc/layers/delegated_frame_resource_collection.h" 9 #include "cc/layers/delegated_frame_resource_collection.h"
10 #include "cc/output/copy_output_result.h" 10 #include "cc/output/copy_output_result.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 scoped_ptr<cc::DelegatedFrameData> frame_data, 120 scoped_ptr<cc::DelegatedFrameData> frame_data,
121 float frame_device_scale_factor, 121 float frame_device_scale_factor,
122 const std::vector<ui::LatencyInfo>& latency_info); 122 const std::vector<ui::LatencyInfo>& latency_info);
123 void WasHidden(); 123 void WasHidden();
124 void WasShown(const ui::LatencyInfo& latency_info); 124 void WasShown(const ui::LatencyInfo& latency_info);
125 void WasResized(); 125 void WasResized();
126 bool HasSavedFrame(); 126 bool HasSavedFrame();
127 gfx::Size GetRequestedRendererSize() const; 127 gfx::Size GetRequestedRendererSize() const;
128 void SetCompositor(ui::Compositor* compositor); 128 void SetCompositor(ui::Compositor* compositor);
129 void ResetCompositor(); 129 void ResetCompositor();
130 void SetVSyncParameters(const base::TimeTicks& timebase,
131 const base::TimeDelta& interval);
130 // Note: |src_subset| is specified in DIP dimensions while |output_size| 132 // Note: |src_subset| is specified in DIP dimensions while |output_size|
131 // expects pixels. 133 // expects pixels.
132 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, 134 void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
133 const gfx::Size& output_size, 135 const gfx::Size& output_size,
134 ReadbackRequestCallback& callback, 136 ReadbackRequestCallback& callback,
135 const SkColorType preferred_color_type); 137 const SkColorType preferred_color_type);
136 void CopyFromCompositingSurfaceToVideoFrame( 138 void CopyFromCompositingSurfaceToVideoFrame(
137 const gfx::Rect& src_subrect, 139 const gfx::Rect& src_subrect,
138 const scoped_refptr<media::VideoFrame>& target, 140 const scoped_refptr<media::VideoFrame>& target,
139 const base::Callback<void(bool)>& callback); 141 const base::Callback<void(bool)>& callback);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // True if this renders into a Surface, false if it renders into a delegated 243 // True if this renders into a Surface, false if it renders into a delegated
242 // layer. 244 // layer.
243 bool use_surfaces_; 245 bool use_surfaces_;
244 246
245 std::vector<base::Closure> on_compositing_did_commit_callbacks_; 247 std::vector<base::Closure> on_compositing_did_commit_callbacks_;
246 248
247 // The vsync manager we are observing for changes, if any. 249 // The vsync manager we are observing for changes, if any.
248 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 250 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
249 251
250 // The current VSync timebase and interval. These are zero until the first 252 // The current VSync timebase and interval. These are zero until the first
251 // call to OnUpdateVSyncParameters(). 253 // call to SetVSyncParameters().
252 base::TimeTicks vsync_timebase_; 254 base::TimeTicks vsync_timebase_;
253 base::TimeDelta vsync_interval_; 255 base::TimeDelta vsync_interval_;
254 256
255 // With delegated renderer, this is the last output surface, used to 257 // With delegated renderer, this is the last output surface, used to
256 // disambiguate resources with the same id coming from different output 258 // disambiguate resources with the same id coming from different output
257 // surfaces. 259 // surfaces.
258 uint32 last_output_surface_id_; 260 uint32 last_output_surface_id_;
259 261
260 // The number of delegated frame acks that are pending, to delay resource 262 // The number of delegated frame acks that are pending, to delay resource
261 // returns until the acks are sent. 263 // returns until the acks are sent.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // YUV readback pipeline. 323 // YUV readback pipeline.
322 scoped_ptr<content::ReadbackYUVInterface> 324 scoped_ptr<content::ReadbackYUVInterface>
323 yuv_readback_pipeline_; 325 yuv_readback_pipeline_;
324 326
325 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 327 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
326 }; 328 };
327 329
328 } // namespace content 330 } // namespace content
329 331
330 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 332 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/browser_compositor_output_surface.cc ('k') | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698