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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Rebase Created 7 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "cc/base/math_util.h" 12 #include "cc/base/math_util.h"
13 #include "cc/input/top_controls_manager.h" 13 #include "cc/input/top_controls_manager.h"
14 #include "cc/layers/delegated_renderer_layer_impl.h" 14 #include "cc/layers/delegated_renderer_layer_impl.h"
15 #include "cc/layers/heads_up_display_layer_impl.h" 15 #include "cc/layers/heads_up_display_layer_impl.h"
16 #include "cc/layers/io_surface_layer_impl.h" 16 #include "cc/layers/io_surface_layer_impl.h"
17 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
18 #include "cc/layers/quad_sink.h" 18 #include "cc/layers/quad_sink.h"
19 #include "cc/layers/render_surface_impl.h" 19 #include "cc/layers/render_surface_impl.h"
20 #include "cc/layers/scrollbar_layer_impl.h" 20 #include "cc/layers/scrollbar_layer_impl.h"
21 #include "cc/layers/solid_color_layer_impl.h" 21 #include "cc/layers/solid_color_layer_impl.h"
22 #include "cc/layers/texture_layer_impl.h" 22 #include "cc/layers/texture_layer_impl.h"
23 #include "cc/layers/tiled_layer_impl.h" 23 #include "cc/layers/tiled_layer_impl.h"
24 #include "cc/layers/video_layer_impl.h" 24 #include "cc/layers/video_layer_impl.h"
25 #include "cc/output/begin_frame_args.h"
25 #include "cc/output/compositor_frame_ack.h" 26 #include "cc/output/compositor_frame_ack.h"
26 #include "cc/output/compositor_frame_metadata.h" 27 #include "cc/output/compositor_frame_metadata.h"
27 #include "cc/output/gl_renderer.h" 28 #include "cc/output/gl_renderer.h"
28 #include "cc/quads/render_pass_draw_quad.h" 29 #include "cc/quads/render_pass_draw_quad.h"
29 #include "cc/quads/solid_color_draw_quad.h" 30 #include "cc/quads/solid_color_draw_quad.h"
30 #include "cc/quads/texture_draw_quad.h" 31 #include "cc/quads/texture_draw_quad.h"
31 #include "cc/quads/tile_draw_quad.h" 32 #include "cc/quads/tile_draw_quad.h"
32 #include "cc/resources/layer_tiling_data.h" 33 #include "cc/resources/layer_tiling_data.h"
33 #include "cc/test/animation_test_common.h" 34 #include "cc/test/animation_test_common.h"
34 #include "cc/test/fake_output_surface.h" 35 #include "cc/test/fake_output_surface.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 89
89 virtual void TearDown() OVERRIDE {} 90 virtual void TearDown() OVERRIDE {}
90 91
91 virtual void DidTryInitializeRendererOnImplThread( 92 virtual void DidTryInitializeRendererOnImplThread(
92 bool success, 93 bool success,
93 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE { 94 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE {
94 did_try_initialize_renderer_ = true; 95 did_try_initialize_renderer_ = true;
95 } 96 }
96 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} 97 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {}
97 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} 98 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {}
98 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) 99 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args)
99 OVERRIDE {} 100 OVERRIDE {}
100 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { 101 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {
101 on_can_draw_state_changed_called_ = true; 102 on_can_draw_state_changed_called_ = true;
102 } 103 }
103 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE { 104 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE {
104 has_pending_tree_ = has_pending_tree; 105 has_pending_tree_ = has_pending_tree;
105 } 106 }
106 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { 107 virtual void SetNeedsRedrawOnImplThread() OVERRIDE {
107 did_request_redraw_ = true; 108 did_request_redraw_ = true;
108 } 109 }
(...skipping 5905 matching lines...) Expand 10 before | Expand all | Expand 10 after
6014 EXPECT_FALSE(did_try_initialize_renderer_); 6015 EXPECT_FALSE(did_try_initialize_renderer_);
6015 host_impl_->DeferredInitialize(scoped_refptr<ContextProvider>()); 6016 host_impl_->DeferredInitialize(scoped_refptr<ContextProvider>());
6016 EXPECT_TRUE(did_try_initialize_renderer_); 6017 EXPECT_TRUE(did_try_initialize_renderer_);
6017 6018
6018 // Defer intialized GL draw. 6019 // Defer intialized GL draw.
6019 DrawFrame(); 6020 DrawFrame();
6020 } 6021 }
6021 6022
6022 } // namespace 6023 } // namespace
6023 } // namespace cc 6024 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698