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

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

Issue 418283003: "Buttery Smooth" Tab Capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Now pixel-weighted. Lots of add'l unit tests. (rebased against ToT) Created 6 years, 4 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 | Annotate | Revision Log
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // DelegatedFrameEvictorClient implementation. 215 // DelegatedFrameEvictorClient implementation.
216 virtual void EvictDelegatedFrame() OVERRIDE; 216 virtual void EvictDelegatedFrame() OVERRIDE;
217 217
218 // cc::DelegatedFrameProviderClient implementation. 218 // cc::DelegatedFrameProviderClient implementation.
219 virtual void UnusedResourcesAreAvailable() OVERRIDE; 219 virtual void UnusedResourcesAreAvailable() OVERRIDE;
220 220
221 // cc::SurfaceFactoryClient implementation. 221 // cc::SurfaceFactoryClient implementation.
222 virtual void ReturnResources( 222 virtual void ReturnResources(
223 const cc::ReturnedResourceArray& resources) OVERRIDE; 223 const cc::ReturnedResourceArray& resources) OVERRIDE;
224 224
225 void DidReceiveFrameFromRenderer(); 225 void DidReceiveFrameFromRenderer(const gfx::Rect& damage_rect);
226 226
227 DelegatedFrameHostClient* client_; 227 DelegatedFrameHostClient* client_;
228 228
229 // True if this renders into a Surface, false if it renders into a delegated 229 // True if this renders into a Surface, false if it renders into a delegated
230 // layer. 230 // layer.
231 bool use_surfaces_; 231 bool use_surfaces_;
232 232
233 std::vector<base::Closure> on_compositing_did_commit_callbacks_; 233 std::vector<base::Closure> on_compositing_did_commit_callbacks_;
234 234
235 // The vsync manager we are observing for changes, if any. 235 // The vsync manager we are observing for changes, if any.
236 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_; 236 scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
237 237
238 // The current VSync timebase and interval. These are zero until the first
239 // call to OnUpdateVSyncParameters().
240 base::TimeTicks vsync_timebase_;
241 base::TimeDelta vsync_interval_;
242
238 // With delegated renderer, this is the last output surface, used to 243 // With delegated renderer, this is the last output surface, used to
239 // disambiguate resources with the same id coming from different output 244 // disambiguate resources with the same id coming from different output
240 // surfaces. 245 // surfaces.
241 uint32 last_output_surface_id_; 246 uint32 last_output_surface_id_;
242 247
243 // The number of delegated frame acks that are pending, to delay resource 248 // The number of delegated frame acks that are pending, to delay resource
244 // returns until the acks are sent. 249 // returns until the acks are sent.
245 int pending_delegated_ack_count_; 250 int pending_delegated_ack_count_;
246 251
247 // True after a delegated frame has been skipped, until a frame is not 252 // True after a delegated frame has been skipped, until a frame is not
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 // YUV readback pipeline. 303 // YUV readback pipeline.
299 scoped_ptr<content::ReadbackYUVInterface> 304 scoped_ptr<content::ReadbackYUVInterface>
300 yuv_readback_pipeline_; 305 yuv_readback_pipeline_;
301 306
302 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 307 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
303 }; 308 };
304 309
305 } // namespace content 310 } // namespace content
306 311
307 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 312 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698