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

Unified Diff: cc/test/test_hooks.h

Issue 2193293004: cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-layertreetest: withperftestsfix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/test_delegating_output_surface.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_hooks.h
diff --git a/cc/test/test_hooks.h b/cc/test/test_hooks.h
index f386091d693c92d8ecb9c47d07b203a233b41c1a..ff0737f70b3e13a58c1f8dbe9208761719928c80 100644
--- a/cc/test/test_hooks.h
+++ b/cc/test/test_hooks.h
@@ -22,6 +22,7 @@ class TestHooks : public AnimationDelegate {
TestHooks();
~TestHooks() override;
+ // Compositor thread hooks.
virtual void CreateResourceAndRasterBufferProvider(
LayerTreeHostImpl* host_impl,
std::unique_ptr<RasterBufferProvider>* raster_buffer_provider,
@@ -45,22 +46,33 @@ class TestHooks : public AnimationDelegate {
LayerTreeHostImpl::FrameData* frame_data,
DrawResult draw_result);
virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) {}
- // Note that this is called asynchronously from the LayerTreeHostImpl
- // performing its draw, so you should record state you want to use here
- // in DrawLayersOnThread() instead. For that reason this method does not
- // receive a LayerTreeHostImpl pointer.
- virtual void SwapBuffersCompleteOnThread() {}
virtual void NotifyReadyToActivateOnThread(LayerTreeHostImpl* host_impl) {}
virtual void NotifyReadyToDrawOnThread(LayerTreeHostImpl* host_impl) {}
virtual void NotifyAllTileTasksCompleted(LayerTreeHostImpl* host_impl) {}
virtual void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl,
const Tile* tile) {}
+ virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
+ bool visible) {}
virtual void AnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) {}
virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl,
bool has_unfinished_animation) {}
virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl,
base::TimeTicks monotonic_time) {}
+
+ // Asynchronous compositor thread hooks.
+ // These are called asynchronously from the LayerTreeHostImpl performing its
+ // draw, so you should record state you want to use here in
+ // DrawLayersOnThread() instead. For that reason these methods do not receive
+ // a LayerTreeHostImpl pointer.
+ virtual void DisplayReceivedCompositorFrameOnThread(
+ const CompositorFrame& frame) {}
+ virtual void DisplayWillDrawAndSwapOnThread(
+ bool will_draw_and_swap,
+ const RenderPassList& render_passes) {}
+ virtual void DisplayDidDrawAndSwapOnThread() {}
+
+ // Main thread hooks.
virtual void ApplyViewportDeltas(
const gfx::Vector2dF& inner_delta,
const gfx::Vector2dF& outer_delta,
@@ -79,8 +91,6 @@ class TestHooks : public AnimationDelegate {
virtual void DidCommit() {}
virtual void DidCommitAndDrawFrame() {}
virtual void DidCompleteSwapBuffers() {}
- virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
- bool visible) {}
virtual void ScheduleComposite() {}
virtual void DidActivateSyncTree() {}
« no previous file with comments | « cc/test/test_delegating_output_surface.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698