diff options
Diffstat (limited to 'cc/trees')
27 files changed, 1059 insertions, 1059 deletions
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc index d334e96..e378561 100644 --- a/cc/trees/layer_tree_host_common_perftest.cc +++ b/cc/trees/layer_tree_host_common_perftest.cc @@ -50,7 +50,7 @@ class LayerTreeHostCommonPerfTest : public LayerTreeTest { ASSERT_TRUE(base::ReadFileToString(json_file, &json_)); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { gfx::Size viewport = gfx::Size(720, 1038); layer_tree_host()->SetViewportSize(viewport); scoped_refptr<Layer> root = @@ -61,7 +61,7 @@ class LayerTreeHostCommonPerfTest : public LayerTreeTest { void SetTestName(const std::string& name) { test_name_ = name; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown()."; perf_test::PrintResult("calc_draw_props_time", "", @@ -84,7 +84,7 @@ class CalcDrawPropsMainTest : public LayerTreeHostCommonPerfTest { RunTest(false, false, false); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { timer_.Reset(); do { @@ -121,11 +121,11 @@ class CalcDrawPropsImplTest : public LayerTreeHostCommonPerfTest { RunTestWithImplSidePainting(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { timer_.Reset(); LayerTreeImpl* active_tree = host_impl->active_tree(); @@ -169,9 +169,9 @@ class LayerSorterMainTest : public CalcDrawPropsImplTest { public: void RunSortLayers() { RunTest(false, false, false); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { LayerTreeImpl* active_tree = host_impl->active_tree(); // First build the tree and then we'll start running tests on layersorter // itself @@ -221,9 +221,9 @@ class BspTreePerfTest : public LayerSorterMainTest { num_duplicates_ = num_duplicates; } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { LayerTreeImpl* active_tree = host_impl->active_tree(); // First build the tree and then we'll start running tests on layersorter // itself diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 7278b33..9efcaea 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -40,7 +40,7 @@ class LayerWithForcedDrawsContent : public Layer { public: LayerWithForcedDrawsContent() {} - virtual bool DrawsContent() const OVERRIDE; + virtual bool DrawsContent() const override; private: virtual ~LayerWithForcedDrawsContent() {} @@ -55,9 +55,9 @@ class MockContentLayerClient : public ContentLayerClient { virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& clip, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE {} - virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + ContentLayerClient::GraphicsContextStatus gc_status) override {} + virtual void DidChangeLayerCanUseLCDText() override {} + virtual bool FillsBoundsCompletely() const override { return false; } }; scoped_refptr<ContentLayer> CreateDrawableContentLayer( @@ -4018,7 +4018,7 @@ class NoScaleContentLayer : public ContentLayer { virtual void CalculateContentsScale(float ideal_contents_scale, float* contents_scale_x, float* contents_scale_y, - gfx::Size* content_bounds) OVERRIDE { + gfx::Size* content_bounds) override { // Skip over the ContentLayer to the base Layer class. Layer::CalculateContentsScale(ideal_contents_scale, contents_scale_x, diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index dd000d6..b7b7f0e 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -145,7 +145,7 @@ class LayerTreeHostImplTimeSourceAdapter : public TimeSourceClient { time_source_->SetActive(false); } - virtual void OnTimerTick() OVERRIDE { + virtual void OnTimerTick() override { // In single threaded mode we attempt to simulate changing the current // thread by maintaining a fake thread id. When we switch from one // thread to another, we construct DebugScopedSetXXXThread objects that diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index fad9f08..a987d46 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h @@ -125,44 +125,44 @@ class CC_EXPORT LayerTreeHostImpl virtual ~LayerTreeHostImpl(); // BeginFrameSourceMixIn implementation - virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) OVERRIDE; + virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override; // InputHandler implementation - virtual void BindToClient(InputHandlerClient* client) OVERRIDE; + virtual void BindToClient(InputHandlerClient* client) override; virtual InputHandler::ScrollStatus ScrollBegin( const gfx::Point& viewport_point, - InputHandler::ScrollInputType type) OVERRIDE; + InputHandler::ScrollInputType type) override; virtual InputHandler::ScrollStatus ScrollAnimated( const gfx::Point& viewport_point, - const gfx::Vector2dF& scroll_delta) OVERRIDE; + const gfx::Vector2dF& scroll_delta) override; virtual bool ScrollBy(const gfx::Point& viewport_point, - const gfx::Vector2dF& scroll_delta) OVERRIDE; + const gfx::Vector2dF& scroll_delta) override; virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point, - ScrollDirection direction) OVERRIDE; + ScrollDirection direction) override; virtual void SetRootLayerScrollOffsetDelegate( - LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; - virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; - virtual void ScrollEnd() OVERRIDE; - virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; - virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; - virtual void PinchGestureBegin() OVERRIDE; + LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) override; + virtual void OnRootLayerDelegatedScrollOffsetChanged() override; + virtual void ScrollEnd() override; + virtual InputHandler::ScrollStatus FlingScrollBegin() override; + virtual void MouseMoveAt(const gfx::Point& viewport_point) override; + virtual void PinchGestureBegin() override; virtual void PinchGestureUpdate(float magnify_delta, - const gfx::Point& anchor) OVERRIDE; - virtual void PinchGestureEnd() OVERRIDE; - virtual void SetNeedsAnimate() OVERRIDE; + const gfx::Point& anchor) override; + virtual void PinchGestureEnd() override; + virtual void SetNeedsAnimate() override; virtual bool IsCurrentlyScrollingLayerAt( const gfx::Point& viewport_point, - InputHandler::ScrollInputType type) OVERRIDE; + InputHandler::ScrollInputType type) override; virtual bool HaveTouchEventHandlersAt( - const gfx::Point& viewport_port) OVERRIDE; + const gfx::Point& viewport_port) override; virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( - ui::LatencyInfo* latency) OVERRIDE; + ui::LatencyInfo* latency) override; // TopControlsManagerClient implementation. - virtual void SetControlsTopOffset(float offset) OVERRIDE; - virtual float ControlsTopOffset() const OVERRIDE; - virtual void DidChangeTopControlsPosition() OVERRIDE; - virtual bool HaveRootScrollLayer() const OVERRIDE; + virtual void SetControlsTopOffset(float offset) override; + virtual float ControlsTopOffset() const override; + virtual void DidChangeTopControlsPosition() override; + virtual bool HaveRootScrollLayer() const override; struct CC_EXPORT FrameData : public RenderPassSink { FrameData(); @@ -179,7 +179,7 @@ class CC_EXPORT LayerTreeHostImpl bool has_no_damage; // RenderPassSink implementation. - virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; + virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override; }; virtual void BeginMainFrameAborted(bool did_handle); @@ -231,30 +231,30 @@ class CC_EXPORT LayerTreeHostImpl const gfx::Rect ViewportRectForTilePriority() const; // RendererClient implementation. - virtual void SetFullRootLayerDamage() OVERRIDE; + virtual void SetFullRootLayerDamage() override; // TileManagerClient implementation. virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() - const OVERRIDE; - virtual void NotifyReadyToActivate() OVERRIDE; - virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; + const override; + virtual void NotifyReadyToActivate() override; + virtual void NotifyTileStateChanged(const Tile* tile) override; virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, - TreePriority tree_priority) OVERRIDE; + TreePriority tree_priority) override; virtual void BuildEvictionQueue(EvictionTilePriorityQueue* queue, - TreePriority tree_priority) OVERRIDE; + TreePriority tree_priority) override; // ScrollbarAnimationControllerClient implementation. virtual void PostDelayedScrollbarFade(const base::Closure& start_fade, - base::TimeDelta delay) OVERRIDE; - virtual void SetNeedsScrollbarAnimationFrame() OVERRIDE; + base::TimeDelta delay) override; + virtual void SetNeedsScrollbarAnimationFrame() override; // OutputSurfaceClient implementation. - virtual void DeferredInitialize() OVERRIDE; - virtual void ReleaseGL() OVERRIDE; + virtual void DeferredInitialize() override; + virtual void ReleaseGL() override; virtual void CommitVSyncParameters(base::TimeTicks timebase, - base::TimeDelta interval) OVERRIDE; - virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; - virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; + base::TimeDelta interval) override; + virtual void SetNeedsRedrawRect(const gfx::Rect& rect) override; + virtual void BeginFrame(const BeginFrameArgs& args) override; virtual void SetExternalDrawConstraints( const gfx::Transform& transform, @@ -262,14 +262,14 @@ class CC_EXPORT LayerTreeHostImpl const gfx::Rect& clip, const gfx::Rect& viewport_rect_for_tile_priority, const gfx::Transform& transform_for_tile_priority, - bool resourceless_software_draw) OVERRIDE; - virtual void DidLoseOutputSurface() OVERRIDE; - virtual void DidSwapBuffers() OVERRIDE; - virtual void DidSwapBuffersComplete() OVERRIDE; - virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; - virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; + bool resourceless_software_draw) override; + virtual void DidLoseOutputSurface() override; + virtual void DidSwapBuffers() override; + virtual void DidSwapBuffersComplete() override; + virtual void ReclaimResources(const CompositorFrameAck* ack) override; + virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; virtual void SetTreeActivationCallback(const base::Closure& callback) - OVERRIDE; + override; // Called from LayerTreeImpl. void OnCanDrawStateChangedForTree(); @@ -427,7 +427,7 @@ class CC_EXPORT LayerTreeHostImpl return begin_impl_frame_interval_; } - virtual void AsValueInto(base::debug::TracedValue* value) const OVERRIDE; + virtual void AsValueInto(base::debug::TracedValue* value) const override; void AsValueWithFrameInto(FrameData* frame, base::debug::TracedValue* value) const; scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index cb52be7..81a7e60 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -105,64 +105,64 @@ class LayerTreeHostImplTest : public testing::Test, return settings; } - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { CreateHostImpl(DefaultSettings(), CreateOutputSurface()); } - virtual void TearDown() OVERRIDE {} + virtual void TearDown() override {} - virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE {} - virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {} + virtual void UpdateRendererCapabilitiesOnImplThread() override {} + virtual void DidLoseOutputSurfaceOnImplThread() override {} virtual void CommitVSyncParameters(base::TimeTicks timebase, - base::TimeDelta interval) OVERRIDE {} - virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {} - virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {} - virtual void DidSwapBuffersOnImplThread() OVERRIDE {} - virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE {} - virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE { + base::TimeDelta interval) override {} + virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {} + virtual void SetMaxSwapsPendingOnImplThread(int max) override {} + virtual void DidSwapBuffersOnImplThread() override {} + virtual void DidSwapBuffersCompleteOnImplThread() override {} + virtual void OnCanDrawStateChanged(bool can_draw) override { on_can_draw_state_changed_called_ = true; } - virtual void NotifyReadyToActivate() OVERRIDE { + virtual void NotifyReadyToActivate() override { did_notify_ready_to_activate_ = true; host_impl_->ActivateSyncTree(); } - virtual void SetNeedsRedrawOnImplThread() OVERRIDE { + virtual void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; } virtual void SetNeedsRedrawRectOnImplThread( - const gfx::Rect& damage_rect) OVERRIDE { + const gfx::Rect& damage_rect) override { did_request_redraw_ = true; } - virtual void SetNeedsAnimateOnImplThread() OVERRIDE { + virtual void SetNeedsAnimateOnImplThread() override { did_request_animate_ = true; } - virtual void SetNeedsManageTilesOnImplThread() OVERRIDE { + virtual void SetNeedsManageTilesOnImplThread() override { did_request_manage_tiles_ = true; } - virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE { + virtual void DidInitializeVisibleTileOnImplThread() override { did_upload_visible_tile_ = true; } - virtual void SetNeedsCommitOnImplThread() OVERRIDE { + virtual void SetNeedsCommitOnImplThread() override { did_request_commit_ = true; } virtual void PostAnimationEventsToMainThreadOnImplThread( - scoped_ptr<AnimationEventsVector> events) OVERRIDE {} + scoped_ptr<AnimationEventsVector> events) override {} virtual bool ReduceContentsTextureMemoryOnImplThread( - size_t limit_bytes, int priority_cutoff) OVERRIDE { + size_t limit_bytes, int priority_cutoff) override { current_limit_bytes_ = limit_bytes; current_priority_cutoff_value_ = priority_cutoff; return reduce_memory_result_; } - virtual bool IsInsideDraw() OVERRIDE { return false; } - virtual void RenewTreePriority() OVERRIDE {} + virtual bool IsInsideDraw() override { return false; } + virtual void RenewTreePriority() override {} virtual void PostDelayedScrollbarFadeOnImplThread( const base::Closure& start_fade, - base::TimeDelta delay) OVERRIDE { + base::TimeDelta delay) override { scrollbar_fade_start_ = start_fade; requested_scrollbar_animation_delay_ = delay; } - virtual void DidActivateSyncTree() OVERRIDE {} - virtual void DidManageTiles() OVERRIDE {} + virtual void DidActivateSyncTree() override {} + virtual void DidManageTiles() override {} void set_reduce_memory_result(bool reduce_memory_result) { reduce_memory_result_ = reduce_memory_result; @@ -1368,7 +1368,7 @@ class LayerTreeHostImplOverridePhysicalTime : public LayerTreeHostImpl { manager, 0) {} - virtual BeginFrameArgs CurrentBeginFrameArgs() const OVERRIDE { + virtual BeginFrameArgs CurrentBeginFrameArgs() const override { return CreateBeginFrameArgsForTesting(fake_current_physical_time_); } @@ -1708,7 +1708,7 @@ class DidDrawCheckLayer : public LayerImpl { } virtual bool WillDraw(DrawMode draw_mode, ResourceProvider* provider) - OVERRIDE { + override { will_draw_called_ = true; if (will_draw_returns_false_) return false; @@ -1717,12 +1717,12 @@ class DidDrawCheckLayer : public LayerImpl { virtual void AppendQuads(RenderPass* render_pass, const OcclusionTracker<LayerImpl>& occlusion_tracker, - AppendQuadsData* append_quads_data) OVERRIDE { + AppendQuadsData* append_quads_data) override { append_quads_called_ = true; LayerImpl::AppendQuads(render_pass, occlusion_tracker, append_quads_data); } - virtual void DidDraw(ResourceProvider* provider) OVERRIDE { + virtual void DidDraw(ResourceProvider* provider) override { did_draw_called_ = true; LayerImpl::DidDraw(provider); } @@ -1940,7 +1940,7 @@ class MissingTextureAnimatingLayer : public DidDrawCheckLayer { virtual void AppendQuads(RenderPass* render_pass, const OcclusionTracker<LayerImpl>& occlusion_tracker, - AppendQuadsData* append_quads_data) OVERRIDE { + AppendQuadsData* append_quads_data) override { LayerImpl::AppendQuads(render_pass, occlusion_tracker, append_quads_data); if (had_incomplete_tile_) append_quads_data->num_incomplete_tiles++; @@ -3283,11 +3283,11 @@ class TestScrollOffsetDelegate : public LayerScrollOffsetDelegate { virtual ~TestScrollOffsetDelegate() {} - virtual gfx::ScrollOffset GetTotalScrollOffset() OVERRIDE { + virtual gfx::ScrollOffset GetTotalScrollOffset() override { return getter_return_value_; } - virtual bool IsExternalFlingActive() const OVERRIDE { return false; } + virtual bool IsExternalFlingActive() const override { return false; } virtual void UpdateRootLayerState( const gfx::ScrollOffset& total_scroll_offset, @@ -3295,7 +3295,7 @@ class TestScrollOffsetDelegate : public LayerScrollOffsetDelegate { const gfx::SizeF& scrollable_size, float page_scale_factor, float min_page_scale_factor, - float max_page_scale_factor) OVERRIDE { + float max_page_scale_factor) override { DCHECK(total_scroll_offset.x() <= max_scroll_offset.x()); DCHECK(total_scroll_offset.y() <= max_scroll_offset.y()); last_set_scroll_offset_ = total_scroll_offset; @@ -3739,7 +3739,7 @@ class BlendStateCheckLayer : public LayerImpl { virtual void AppendQuads(RenderPass* render_pass, const OcclusionTracker<LayerImpl>& occlusion_tracker, - AppendQuadsData* append_quads_data) OVERRIDE { + AppendQuadsData* append_quads_data) override { quads_appended_ = true; gfx::Rect opaque_rect; @@ -4149,7 +4149,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { host_impl_->DidDrawAllLayers(frame); } - virtual void DidActivateSyncTree() OVERRIDE { + virtual void DidActivateSyncTree() override { did_activate_pending_tree_ = true; } @@ -4503,7 +4503,7 @@ class FakeLayerWithQuads : public LayerImpl { virtual void AppendQuads(RenderPass* render_pass, const OcclusionTracker<LayerImpl>& occlusion_tracker, - AppendQuadsData* append_quads_data) OVERRIDE { + AppendQuadsData* append_quads_data) override { SharedQuadState* shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); PopulateSharedQuadState(shared_quad_state); @@ -4951,7 +4951,7 @@ TEST_F(LayerTreeHostImplTest, ReleaseContentsTextureShouldTriggerCommit) { class LayerTreeHostImplTestWithDelegatingRenderer : public LayerTreeHostImplTest { protected: - virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { + virtual scoped_ptr<OutputSurface> CreateOutputSurface() override { return FakeOutputSurface::CreateDelegating3d(); } @@ -5041,7 +5041,7 @@ class FakeMaskLayerImpl : public LayerImpl { return make_scoped_ptr(new FakeMaskLayerImpl(tree_impl, id)); } - virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE { + virtual ResourceProvider::ResourceId ContentsResourceId() const override { return 0; } @@ -5771,7 +5771,7 @@ class CompositorFrameMetadataTest : public LayerTreeHostImplTest { CompositorFrameMetadataTest() : swap_buffers_complete_(0) {} - virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE { + virtual void DidSwapBuffersCompleteOnImplThread() override { swap_buffers_complete_++; } @@ -5796,11 +5796,11 @@ class CountingSoftwareDevice : public SoftwareOutputDevice { public: CountingSoftwareDevice() : frames_began_(0), frames_ended_(0) {} - virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE { + virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override { ++frames_began_; return SoftwareOutputDevice::BeginPaint(damage_rect); } - virtual void EndPaint(SoftwareFrameData* frame_data) OVERRIDE { + virtual void EndPaint(SoftwareFrameData* frame_data) override { ++frames_ended_; SoftwareOutputDevice::EndPaint(frame_data); } @@ -5894,7 +5894,7 @@ TEST_F(LayerTreeHostImplTest, class LayerTreeHostImplTestDeferredInitialize : public LayerTreeHostImplTest { protected: - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { LayerTreeHostImplTest::SetUp(); set_reduce_memory_result(false); @@ -5915,7 +5915,7 @@ class LayerTreeHostImplTestDeferredInitialize : public LayerTreeHostImplTest { onscreen_context_provider_ = TestContextProvider::Create(); } - virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE { + virtual void UpdateRendererCapabilitiesOnImplThread() override { did_update_renderer_capabilities_ = true; } @@ -6082,7 +6082,7 @@ TEST_F(LayerTreeHostImplTest, RequireHighResAfterGpuRasterizationToggles) { class LayerTreeHostImplTestManageTiles : public LayerTreeHostImplTest { public: - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { LayerTreeSettings settings; settings.impl_side_painting = true; @@ -6634,15 +6634,15 @@ class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { virtual ~SimpleSwapPromiseMonitor() {} - virtual void OnSetNeedsCommitOnMain() OVERRIDE { + virtual void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } - virtual void OnSetNeedsRedrawOnImpl() OVERRIDE { + virtual void OnSetNeedsRedrawOnImpl() override { (*set_needs_redraw_count_)++; } - virtual void OnForwardScrollUpdateToMainThreadOnImpl() OVERRIDE { + virtual void OnForwardScrollUpdateToMainThreadOnImpl() override { (*forward_to_main_count_)++; } @@ -6742,7 +6742,7 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) { class LayerTreeHostImplWithTopControlsTest : public LayerTreeHostImplTest { public: - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { LayerTreeSettings settings = DefaultSettings(); settings.calculate_top_controls_position = true; settings.top_controls_height = top_controls_height_; @@ -7061,7 +7061,7 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, FlingScrollBubblesToInner) { class LayerTreeHostImplWithImplicitLimitsTest : public LayerTreeHostImplTest { public: - virtual void SetUp() OVERRIDE { + virtual void SetUp() override { LayerTreeSettings settings = DefaultSettings(); settings.max_memory_for_prepaint_percentage = 50; CreateHostImpl(settings, CreateOutputSurface()); @@ -7252,7 +7252,7 @@ TEST_F(LayerTreeHostImplTest, DidBecomeActive) { class LayerTreeHostImplCountingLostSurfaces : public LayerTreeHostImplTest { public: LayerTreeHostImplCountingLostSurfaces() : num_lost_surfaces_(0) {} - virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE { + virtual void DidLoseOutputSurfaceOnImplThread() override { num_lost_surfaces_++; } diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc index 6e43ddf..a516a50 100644 --- a/cc/trees/layer_tree_host_perftest.cc +++ b/cc/trees/layer_tree_host_perftest.cc @@ -44,34 +44,34 @@ class LayerTreeHostPerfTest : public LayerTreeTest { measure_commit_cost_(false) { } - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->throttle_frame_production = false; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { BuildTree(); PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { if (begin_frame_driven_drawing_ && !TestEnded()) { layer_tree_host()->SetNeedsAnimate(); layer_tree_host()->SetNextCommitForcesRedraw(); } } - virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override { if (measure_commit_cost_) commit_timer_.Start(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { commit_timer_.NextLap(); } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (TestEnded() || CleanUpStarted()) return; draw_timer_.NextLap(); @@ -91,7 +91,7 @@ class LayerTreeHostPerfTest : public LayerTreeTest { virtual void BuildTree() {} - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; perf_test::PrintResult("layer_tree_host_frame_time", "", test_name_, 1000 * draw_timer_.MsPerLap(), "us", true); @@ -131,7 +131,7 @@ class LayerTreeHostPerfTestJsonReader : public LayerTreeHostPerfTest { ASSERT_TRUE(base::ReadFileToString(json_file, &json_)); } - virtual void BuildTree() OVERRIDE { + virtual void BuildTree() override { gfx::Size viewport = gfx::Size(720, 1038); layer_tree_host()->SetViewportSize(viewport); scoped_refptr<Layer> root = ParseTreeFromJson(json_, @@ -178,7 +178,7 @@ TEST_F(LayerTreeHostPerfTestJsonReader, class LayerTreeHostPerfTestLeafInvalidates : public LayerTreeHostPerfTestJsonReader { public: - virtual void BuildTree() OVERRIDE { + virtual void BuildTree() override { LayerTreeHostPerfTestJsonReader::BuildTree(); // Find a leaf layer. @@ -188,7 +188,7 @@ class LayerTreeHostPerfTestLeafInvalidates } } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (TestEnded()) return; @@ -221,13 +221,13 @@ class ScrollingLayerTreePerfTest : public LayerTreeHostPerfTestJsonReader { : LayerTreeHostPerfTestJsonReader() { } - virtual void BuildTree() OVERRIDE { + virtual void BuildTree() override { LayerTreeHostPerfTestJsonReader::BuildTree(); scrollable_ = layer_tree_host()->root_layer()->children()[1]; ASSERT_TRUE(scrollable_.get()); } - virtual void Layout() OVERRIDE { + virtual void Layout() override { if (TestEnded()) return; static const gfx::Vector2d delta = gfx::Vector2d(0, 10); @@ -262,7 +262,7 @@ class BrowserCompositorInvalidateLayerTreePerfTest next_sync_point_(1), clean_up_started_(false) {} - virtual void BuildTree() OVERRIDE { + virtual void BuildTree() override { LayerTreeHostPerfTestJsonReader::BuildTree(); tab_contents_ = static_cast<TextureLayer*>( @@ -273,7 +273,7 @@ class BrowserCompositorInvalidateLayerTreePerfTest ASSERT_TRUE(tab_contents_.get()); } - virtual void WillCommit() OVERRIDE { + virtual void WillCommit() override { if (CleanUpStarted()) return; gpu::Mailbox gpu_mailbox; @@ -289,13 +289,13 @@ class BrowserCompositorInvalidateLayerTreePerfTest tab_contents_->SetTextureMailbox(mailbox, callback.Pass()); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (CleanUpStarted()) return; layer_tree_host()->SetNeedsCommit(); } - virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override { clean_up_started_ = true; MainThreadTaskRunner()->PostTask( FROM_HERE, @@ -310,7 +310,7 @@ class BrowserCompositorInvalidateLayerTreePerfTest EndTest(); } - virtual bool CleanUpStarted() OVERRIDE { return clean_up_started_; } + virtual bool CleanUpStarted() override { return clean_up_started_; } private: scoped_refptr<TextureLayer> tab_contents_; diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc index 5303ed1..4afc4ec 100644 --- a/cc/trees/layer_tree_host_pixeltest_filters.cc +++ b/cc/trees/layer_tree_host_pixeltest_filters.cc @@ -159,12 +159,12 @@ TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlurOffAxis) { class LayerTreeHostFiltersScaledPixelTest : public LayerTreeHostFiltersPixelTest { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // Required so that device scale is inherited by content scale. settings->layer_transforms_should_scale_layer_contents = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_); LayerTreePixelTest::SetupTree(); } diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc index 5d5022f..bd32119 100644 --- a/cc/trees/layer_tree_host_pixeltest_masks.cc +++ b/cc/trees/layer_tree_host_pixeltest_masks.cc @@ -22,14 +22,14 @@ class MaskContentLayerClient : public ContentLayerClient { MaskContentLayerClient() {} virtual ~MaskContentLayerClient() {} - virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} + virtual void DidChangeLayerCanUseLCDText() override {} - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + virtual bool FillsBoundsCompletely() const override { return false; } virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& rect, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { + ContentLayerClient::GraphicsContextStatus gc_status) override { SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(SkIntToScalar(2)); diff --git a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc index 64b8bc3..c63e082 100644 --- a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc +++ b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc @@ -22,11 +22,11 @@ namespace { class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { // Not enough memory available. Enforce on-demand rasterization. impl->SetMemoryPolicy( ManagedMemoryPolicy(1, gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING, @@ -34,7 +34,7 @@ class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { // Find the PictureLayerImpl ask it to append quads to check their material. // The PictureLayerImpl is assumed to be the first child of the root layer // in the active tree. @@ -64,14 +64,14 @@ class BlueYellowLayerClient : public ContentLayerClient { explicit BlueYellowLayerClient(gfx::Rect layer_rect) : layer_rect_(layer_rect) {} - virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } + virtual void DidChangeLayerCanUseLCDText() override { } - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + virtual bool FillsBoundsCompletely() const override { return false; } virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& clip, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { + ContentLayerClient::GraphicsContextStatus gc_status) override { SkPaint paint; paint.setColor(SK_ColorBLUE); canvas->drawRect(SkRect::MakeWH(layer_rect_.width(), @@ -113,7 +113,7 @@ TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) { class LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForced : public LayerTreeHostOnDemandRasterPixelTest { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { LayerTreeHostOnDemandRasterPixelTest::InitializeSettings(settings); settings->gpu_rasterization_forced = true; } diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc index bbf9668..1b7679b 100644 --- a/cc/trees/layer_tree_host_pixeltest_readback.cc +++ b/cc/trees/layer_tree_host_pixeltest_readback.cc @@ -24,7 +24,7 @@ class LayerTreeHostReadbackPixelTest : public LayerTreePixelTest { LayerTreeHostReadbackPixelTest() : insert_copy_request_after_frame_count_(0) {} - virtual scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest() OVERRIDE { + virtual scoped_ptr<CopyOutputRequest> CreateCopyOutputRequest() override { scoped_ptr<CopyOutputRequest> request; switch (test_type_) { @@ -51,7 +51,7 @@ class LayerTreeHostReadbackPixelTest : public LayerTreePixelTest { return request.Pass(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { if (insert_copy_request_after_frame_count_ == 0) { Layer* const target = readback_target_ ? readback_target_ : layer_tree_host()->root_layer(); @@ -60,7 +60,7 @@ class LayerTreeHostReadbackPixelTest : public LayerTreePixelTest { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (insert_copy_request_after_frame_count_ == layer_tree_host()->source_frame_number()) { Layer* const target = @@ -920,17 +920,17 @@ class LayerTreeHostReadbackDeviceScalePixelTest green_client_(SK_ColorGREEN), blue_client_(SK_ColorBLUE) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // Cause the device scale factor to be inherited by contents scales. settings->layer_transforms_should_scale_layer_contents = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_); LayerTreePixelTest::SetupTree(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_EQ(device_scale_factor_, host_impl->active_tree()->device_scale_factor()); } diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index 4a3fa7e..d8b8b3e 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -75,22 +75,22 @@ class LayerTreeHostTestSetNeedsCommit1 : public LayerTreeHostTest { public: LayerTreeHostTestSetNeedsCommit1() : num_commits_(0), num_draws_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { num_draws_++; if (!impl->active_tree()->source_frame_number()) EndTest(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { num_commits_++; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_LE(1, num_commits_); EXPECT_LE(1, num_draws_); } @@ -108,13 +108,13 @@ class LayerTreeHostTestSetNeedsCommit2 : public LayerTreeHostTest { public: LayerTreeHostTestSetNeedsCommit2() : num_commits_(0), num_draws_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { ++num_draws_; } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { ++num_commits_; switch (num_commits_) { case 1: @@ -128,7 +128,7 @@ class LayerTreeHostTestSetNeedsCommit2 : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(2, num_commits_); EXPECT_LE(1, num_draws_); } @@ -143,7 +143,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestSetNeedsCommit2); // Verify that we pass property values in PushPropertiesTo. class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root = Layer::Create(); root->SetBounds(gfx::Size(10, 10)); layer_tree_host()->SetRootLayer(root); @@ -158,16 +158,16 @@ class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest { DONE, }; - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { index_ = STARTUP; PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { VerifyAfterValues(impl->active_tree()->root_layer()); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { SetBeforeValues(layer_tree_host()->root_layer()); VerifyBeforeValues(layer_tree_host()->root_layer()); @@ -180,7 +180,7 @@ class LayerTreeHostTestPushPropertiesTo : public LayerTreeHostTest { SetAfterValues(layer_tree_host()->root_layer()); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} void VerifyBeforeValues(Layer* layer) { EXPECT_EQ(gfx::Size(10, 10).ToString(), layer->bounds().ToString()); @@ -239,9 +239,9 @@ class LayerTreeHostTestSetNeedsRedraw : public LayerTreeHostTest { public: LayerTreeHostTestSetNeedsRedraw() : num_commits_(0), num_draws_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { EXPECT_EQ(0, impl->active_tree()->source_frame_number()); if (!num_draws_) { // Redraw again to verify that the second redraw doesn't commit. @@ -252,12 +252,12 @@ class LayerTreeHostTestSetNeedsRedraw : public LayerTreeHostTest { num_draws_++; } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { EXPECT_EQ(0, num_draws_); num_commits_++; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_GE(2, num_draws_); EXPECT_EQ(1, num_commits_); } @@ -279,7 +279,7 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest { invalid_rect_(10, 10, 20, 20), root_layer_(ContentLayer::Create(&client_)) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { root_layer_->SetIsDrawable(true); root_layer_->SetBounds(bounds_); layer_tree_host()->SetRootLayer(root_layer_); @@ -290,7 +290,7 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); gfx::RectF root_damage_rect; @@ -308,7 +308,7 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest { return draw_result; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (!num_draws_) { PostSetNeedsRedrawRectToMainThread(invalid_rect_); } else { @@ -317,7 +317,7 @@ class LayerTreeHostTestSetNeedsRedrawRect : public LayerTreeHostTest { num_draws_++; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(2, num_draws_); } + virtual void AfterTest() override { EXPECT_EQ(2, num_draws_); } private: int num_draws_; @@ -331,11 +331,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSetNeedsRedrawRect); class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->layer_transforms_should_scale_layer_contents = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_ = Layer::Create(); root_layer_->SetBounds(gfx::Size(10, 20)); @@ -347,14 +347,14 @@ class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() == 1) EndTest(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: // Changing the device scale factor causes a commit. It also changes @@ -368,7 +368,7 @@ class LayerTreeHostTestNoExtraCommitFromInvalidate : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(gfx::Size(4, 4).ToString(), scaled_layer_->content_bounds().ToString()); } @@ -384,11 +384,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestNoExtraCommitFromInvalidate); class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->layer_transforms_should_scale_layer_contents = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_ = Layer::Create(); root_layer_->SetBounds(gfx::Size(10, 20)); @@ -405,14 +405,14 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() == 1) EndTest(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: // Changing the device scale factor causes a commit. It also changes @@ -426,7 +426,7 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(gfx::Size(40, 40).ToString(), scrollbar_->content_bounds().ToString()); } @@ -448,7 +448,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { invalid_rect_(10, 10, 20, 20), root_layer_(ContentLayer::Create(&client_)) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { root_layer_->SetIsDrawable(true); root_layer_->SetBounds(bounds_); layer_tree_host()->SetRootLayer(root_layer_); @@ -456,7 +456,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { if (num_draws_ == 3 && host_impl->settings().impl_side_painting) host_impl->SetNeedsRedrawRect(invalid_rect_); } @@ -464,7 +464,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); gfx::RectF root_damage_rect; @@ -492,7 +492,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { return draw_result; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { switch (num_draws_) { case 0: case 1: @@ -519,7 +519,7 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest { num_draws_++; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(5, num_draws_); } + virtual void AfterTest() override { EXPECT_EQ(5, num_draws_); } private: int num_draws_; @@ -538,7 +538,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { LayerTreeHostTestUndrawnLayersDamageLater() : root_layer_(ContentLayer::Create(&client_)) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_->SetIsDrawable(true); root_layer_->SetBounds(gfx::Size(50, 50)); layer_tree_host()->SetRootLayer(root_layer_); @@ -557,12 +557,12 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); gfx::RectF root_damage_rect; @@ -590,7 +590,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { return draw_result; } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: // Test not owning the surface. @@ -612,7 +612,7 @@ class LayerTreeHostTestUndrawnLayersDamageLater : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -632,7 +632,7 @@ class LayerTreeHostTestUndrawnLayersPushContentBoundsLater LayerTreeHostTestUndrawnLayersPushContentBoundsLater() : root_layer_(Layer::Create()) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_->SetIsDrawable(true); root_layer_->SetBounds(gfx::Size(20, 20)); layer_tree_host()->SetRootLayer(root_layer_); @@ -649,9 +649,9 @@ class LayerTreeHostTestUndrawnLayersPushContentBoundsLater LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { LayerImpl* root = host_impl->active_tree()->root_layer(); LayerImpl* parent = root->children()[0]; LayerImpl* child = parent->children()[0]; @@ -671,7 +671,7 @@ class LayerTreeHostTestUndrawnLayersPushContentBoundsLater } } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: parent_layer_->SetOpacity(1.0f); @@ -683,7 +683,7 @@ class LayerTreeHostTestUndrawnLayersPushContentBoundsLater } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: scoped_refptr<Layer> root_layer_; @@ -700,21 +700,21 @@ class LayerTreeHostTestCommit : public LayerTreeHostTest { public: LayerTreeHostTestCommit() {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(20, 20)); layer_tree_host()->set_background_color(SK_ColorGRAY); PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { EXPECT_EQ(gfx::Size(20, 20), impl->DrawViewportSize()); EXPECT_EQ(SK_ColorGRAY, impl->active_tree()->background_color()); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; MULTI_THREAD_TEST_F(LayerTreeHostTestCommit); @@ -728,20 +728,20 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails LayerTreeHostTestFrameTimeUpdatesAfterActivationFails() : frame_count_with_pending_tree_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(20, 20)); layer_tree_host()->set_background_color(SK_ColorGRAY); PostSetNeedsCommitToMainThread(); } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { EXPECT_EQ(frame_count_with_pending_tree_, 0); impl->BlockNotifyReadyToActivateForTesting(true); } virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl, - const BeginFrameArgs& args) OVERRIDE { + const BeginFrameArgs& args) override { if (impl->pending_tree()) frame_count_with_pending_tree_++; @@ -753,7 +753,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (frame_count_with_pending_tree_ > 1) { EXPECT_NE(first_frame_time_.ToInternalValue(), 0); EXPECT_NE(first_frame_time_.ToInternalValue(), @@ -765,12 +765,12 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails EXPECT_FALSE(impl->settings().impl_side_painting); EndTest(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { if (impl->settings().impl_side_painting) EXPECT_NE(frame_count_with_pending_tree_, 1); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int frame_count_with_pending_tree_; @@ -786,14 +786,14 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest { public: LayerTreeHostTestFrameTimeUpdatesAfterDraw() : frame_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(20, 20)); layer_tree_host()->set_background_color(SK_ColorGRAY); PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { frame_++; if (frame_ == 1) { first_frame_time_ = impl->CurrentBeginFrameArgs().frame_time; @@ -811,7 +811,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest { EndTest(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { // Ensure there isn't a commit between the two draws, to ensure that a // commit isn't required for updating the current frame time. We can // only check for this in the multi-threaded case, since in the single- @@ -820,7 +820,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest { EXPECT_EQ(0, frame_); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int frame_; @@ -835,7 +835,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest { public: LayerTreeHostTestStartPageScaleAnimation() {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); if (layer_tree_host()->settings().impl_side_painting) { @@ -861,18 +861,18 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest { layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float) OVERRIDE { + float) override { gfx::ScrollOffset offset = scroll_layer_->scroll_offset(); scroll_layer_->SetScrollOffset(ScrollOffsetWithDelta(offset, scroll_delta)); layer_tree_host()->SetPageScaleFactorAndLimits(scale, 0.5f, 2.f); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { // We get one commit before the first draw, and the animation doesn't happen // until the second draw. switch (impl->active_tree()->source_frame_number()) { @@ -892,7 +892,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest { } } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: layer_tree_host()->StartPageScaleAnimation( @@ -901,7 +901,7 @@ class LayerTreeHostTestStartPageScaleAnimation : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<Layer> scroll_layer_; @@ -913,7 +913,7 @@ class LayerTreeHostTestSetVisible : public LayerTreeHostTest { public: LayerTreeHostTestSetVisible() : num_draws_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); PostSetVisibleToMainThread(false); // This is suppressed while we're invisible. @@ -922,13 +922,13 @@ class LayerTreeHostTestSetVisible : public LayerTreeHostTest { PostSetVisibleToMainThread(true); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { EXPECT_TRUE(impl->visible()); ++num_draws_; EndTest(); } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_draws_); } + virtual void AfterTest() override { EXPECT_EQ(1, num_draws_); } private: int num_draws_; @@ -945,13 +945,13 @@ class TestOpacityChangeLayerDelegate : public ContentLayerClient { virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& clip, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { + ContentLayerClient::GraphicsContextStatus gc_status) override { // Set layer opacity to 0. if (test_layer_) test_layer_->SetOpacity(0.f); } - virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + virtual void DidChangeLayerCanUseLCDText() override {} + virtual bool FillsBoundsCompletely() const override { return false; } private: Layer* test_layer_; @@ -968,7 +968,7 @@ class ContentLayerWithUpdateTracking : public ContentLayer { void ResetPaintContentsCount() { paint_contents_count_ = 0; } virtual bool Update(ResourceUpdateQueue* queue, - const OcclusionTracker<Layer>* occlusion) OVERRIDE { + const OcclusionTracker<Layer>* occlusion) override { bool updated = ContentLayer::Update(queue, occlusion); paint_contents_count_++; return updated; @@ -996,18 +996,18 @@ class LayerTreeHostTestOpacityChange : public LayerTreeHostTest { test_opacity_change_delegate_.SetTestLayer(update_check_layer_.get()); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(10, 10)); layer_tree_host()->root_layer()->AddChild(update_check_layer_); PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Update() should have been called once. EXPECT_EQ(1, update_check_layer_->PaintContentsCount()); } @@ -1028,7 +1028,7 @@ class NoScaleContentLayer : public ContentLayer { virtual void CalculateContentsScale(float ideal_contents_scale, float* contents_scale_x, float* contents_scale_y, - gfx::Size* contentBounds) OVERRIDE { + gfx::Size* contentBounds) override { // Skip over the ContentLayer's method to the base Layer class. Layer::CalculateContentsScale(ideal_contents_scale, contents_scale_x, @@ -1049,7 +1049,7 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers : root_layer_(NoScaleContentLayer::Create(&client_)), child_layer_(ContentLayer::Create(&client_)) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(60, 60)); layer_tree_host()->SetDeviceScaleFactor(1.5); EXPECT_EQ(gfx::Size(60, 60), layer_tree_host()->device_viewport_size()); @@ -1068,7 +1068,7 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { // Should only do one commit. EXPECT_EQ(0, impl->active_tree()->source_frame_number()); // Device scale factor should come over to impl. @@ -1134,7 +1134,7 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -1147,7 +1147,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers); // Verify atomicity of commits and reuse of textures. class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->texture_id_allocation_chunk_size = 1; // Make sure partial texture updates are turned off. settings->max_partial_texture_updates = 0; @@ -1155,7 +1155,7 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { settings->scrollbar_animator = LayerTreeSettings::NoAnimator; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { layer_ = FakeContentLayer::Create(&client_); layer_->SetBounds(gfx::Size(10, 20)); @@ -1172,12 +1172,12 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { drew_frame_ = -1; PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { ASSERT_EQ(0u, layer_tree_host()->settings().max_partial_texture_updates); TestWebGraphicsContext3D* context = TestContext(); @@ -1218,7 +1218,7 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { TestWebGraphicsContext3D* context = TestContext(); if (drew_frame_ == impl->active_tree()->source_frame_number()) { @@ -1235,12 +1235,12 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void Layout() OVERRIDE { + virtual void Layout() override { layer_->SetNeedsDisplay(); scrollbar_->SetNeedsDisplay(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} protected: FakeContentLayerClient client_; @@ -1255,7 +1255,7 @@ MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( class LayerTreeHostTestDelegatingRendererAtomicCommit : public LayerTreeHostTestDirectRendererAtomicCommit { public: - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { ASSERT_EQ(0u, layer_tree_host()->settings().max_partial_texture_updates); TestWebGraphicsContext3D* context = TestContext(); @@ -1322,7 +1322,7 @@ static void SetLayerPropertiesForTesting(Layer* layer, class LayerTreeHostTestAtomicCommitWithPartialUpdate : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->texture_id_allocation_chunk_size = 1; // Allow one partial texture update. settings->max_partial_texture_updates = 1; @@ -1330,7 +1330,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate settings->impl_side_painting = false; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { parent_ = FakeContentLayer::Create(&client_); parent_->SetBounds(gfx::Size(10, 20)); @@ -1344,9 +1344,9 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: parent_->SetNeedsDisplay(); @@ -1373,7 +1373,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { ASSERT_EQ(1u, layer_tree_host()->settings().max_partial_texture_updates); TestWebGraphicsContext3D* context = TestContext(); @@ -1463,7 +1463,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { EXPECT_LT(impl->active_tree()->source_frame_number(), 5); TestWebGraphicsContext3D* context = TestContext(); @@ -1480,7 +1480,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate context->ResetUsedTextures(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -1495,7 +1495,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( class LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit : public LayerTreeHostTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_ = FakeContentLayer::Create(&client_); root_layer_->SetBounds(gfx::Size(100, 100)); @@ -1521,9 +1521,9 @@ class LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { Renderer* renderer = host_impl->renderer(); RenderPassId surface1_render_pass_id = host_impl->active_tree() ->root_layer() @@ -1560,12 +1560,12 @@ class LayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit } } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (layer_tree_host()->source_frame_number() < 2) root_layer_->SetNeedsDisplay(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_LE(2u, root_layer_->update_count()); EXPECT_LE(2u, surface_layer1_->update_count()); EXPECT_LE(2u, surface_layer2_->update_count()); @@ -1590,13 +1590,13 @@ class EvictionTestLayer : public Layer { } virtual bool Update(ResourceUpdateQueue*, - const OcclusionTracker<Layer>*) OVERRIDE; - virtual bool DrawsContent() const OVERRIDE { return true; } + const OcclusionTracker<Layer>*) override; + virtual bool DrawsContent() const override { return true; } virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) - OVERRIDE; - virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE; - virtual void SetTexturePriorities(const PriorityCalculator&) OVERRIDE; + override; + virtual void PushPropertiesTo(LayerImpl* impl) override; + virtual void SetTexturePriorities(const PriorityCalculator&) override; bool HaveBackingTexture() const { return texture_.get() ? texture_->have_backing_texture() : false; @@ -1629,7 +1629,7 @@ class EvictionTestLayerImpl : public LayerImpl { virtual void AppendQuads(RenderPass* render_pass, const OcclusionTracker<LayerImpl>& occlusion_tracker, - AppendQuadsData* append_quads_data) OVERRIDE { + AppendQuadsData* append_quads_data) override { ASSERT_TRUE(has_texture_); ASSERT_NE(0u, layer_tree_impl()->resource_provider()->num_resources()); } @@ -1683,7 +1683,7 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest { impl_for_evict_textures_(0), num_commits_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetRootLayer(layer_); layer_tree_host()->SetViewportSize(gfx::Size(10, 20)); @@ -1733,7 +1733,7 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest { // the beginFrame/commit pair. // Commits 5+6 test the path where an eviction happens during the eviction // recovery path. - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (num_commits_) { case 1: EXPECT_TRUE(layer_->HaveBackingTexture()); @@ -1761,11 +1761,11 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { impl_for_evict_textures_ = impl; } - virtual void Layout() OVERRIDE { + virtual void Layout() override { ++num_commits_; switch (num_commits_) { case 1: @@ -1794,7 +1794,7 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -1810,7 +1810,7 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest { LayerTreeHostTestContinuousInvalidate() : num_commit_complete_(0), num_draw_layers_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(10, 10)); layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10)); @@ -1823,24 +1823,24 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (num_draw_layers_ == 2) return; content_layer_->SetNeedsDisplay(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { if (num_draw_layers_ == 1) num_commit_complete_++; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { num_draw_layers_++; if (num_draw_layers_ == 2) EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Check that we didn't commit twice between first and second draw. EXPECT_EQ(1, num_commit_complete_); } @@ -1859,14 +1859,14 @@ class LayerTreeHostTestDeferCommits : public LayerTreeHostTest { LayerTreeHostTestDeferCommits() : num_commits_deferred_(0), num_complete_commits_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidDeferCommit() OVERRIDE { + virtual void DidDeferCommit() override { num_commits_deferred_++; layer_tree_host()->SetDeferCommits(false); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { num_complete_commits_++; switch (num_complete_commits_) { case 1: @@ -1883,7 +1883,7 @@ class LayerTreeHostTestDeferCommits : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(1, num_commits_deferred_); EXPECT_EQ(2, num_complete_commits_); } @@ -2056,7 +2056,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted child_layer2_(FakeContentLayer::Create(&client_)), num_commits_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size(100, 100)); root_layer_->SetBounds(gfx::Size(100, 100)); child_layer1_->SetBounds(gfx::Size(100, 100)); @@ -2068,7 +2068,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted } virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, - bool visible) OVERRIDE { + bool visible) override { if (visible) { // One backing should remain unevicted. EXPECT_EQ( @@ -2086,7 +2086,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted EndTest(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { ++num_commits_; switch (num_commits_) { case 1: @@ -2118,7 +2118,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -2145,14 +2145,14 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest { virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& clip, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { + ContentLayerClient::GraphicsContextStatus gc_status) override { ++paint_count_; } - virtual void DidChangeLayerCanUseLCDText() OVERRIDE { + virtual void DidChangeLayerCanUseLCDText() override { ++lcd_notification_count_; layer_->SetNeedsDisplay(); } - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + virtual bool FillsBoundsCompletely() const override { return false; } private: Layer* layer_; @@ -2160,7 +2160,7 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest { int lcd_notification_count_; }; - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root_layer; if (layer_tree_host()->settings().impl_side_painting) root_layer = PictureLayer::Create(&client_); @@ -2180,10 +2180,10 @@ class LayerTreeHostTestLCDNotification : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } - virtual void AfterTest() OVERRIDE {} + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } + virtual void AfterTest() override {} - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: // The first update consists of one LCD notification and one paint. @@ -2228,11 +2228,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestLCDNotification); // Verify that the BeginFrame notification is used to initiate rendering. class LayerTreeHostTestBeginFrameNotification : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->begin_frame_scheduling_enabled = true; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // This will trigger a SetNeedsBeginFrame which will trigger a // BeginFrame. PostSetNeedsCommitToMainThread(); @@ -2241,12 +2241,12 @@ class LayerTreeHostTestBeginFrameNotification : public LayerTreeHostTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EndTest(); return DRAW_SUCCESS; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: base::TimeTicks frame_time_; @@ -2257,14 +2257,14 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestBeginFrameNotification); class LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->begin_frame_scheduling_enabled = true; settings->using_synchronous_renderer_compositor = true; } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { // The BeginFrame notification is turned off now but will get enabled // once we return. End test while it's enabled. ImplThreadTaskRunner()->PostTask( @@ -2273,7 +2273,7 @@ class LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled base::Unretained(this))); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; MULTI_THREAD_TEST_F( @@ -2284,13 +2284,13 @@ class LayerTreeHostTestAbortedCommitDoesntStall : public LayerTreeHostTest { LayerTreeHostTestAbortedCommitDoesntStall() : commit_count_(0), commit_abort_count_(0), commit_complete_count_(0) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->begin_frame_scheduling_enabled = true; } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { commit_count_++; if (commit_count_ == 4) { // After two aborted commits, request a real commit now to make sure a @@ -2301,13 +2301,13 @@ class LayerTreeHostTestAbortedCommitDoesntStall : public LayerTreeHostTest { } virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, - bool did_handle) OVERRIDE { + bool did_handle) override { commit_abort_count_++; // Initiate another abortable commit. host_impl->SetNeedsCommit(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { commit_complete_count_++; if (commit_complete_count_ == 1) { // Initiate an abortable commit after the first commit. @@ -2317,7 +2317,7 @@ class LayerTreeHostTestAbortedCommitDoesntStall : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(commit_count_, 5); EXPECT_EQ(commit_abort_count_, 3); EXPECT_EQ(commit_complete_count_, 2); @@ -2330,7 +2330,7 @@ class LayerTreeHostTestAbortedCommitDoesntStall : public LayerTreeHostTest { class LayerTreeHostTestAbortedCommitDoesntStallSynchronousCompositor : public LayerTreeHostTestAbortedCommitDoesntStall { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings); settings->using_synchronous_renderer_compositor = true; } @@ -2341,7 +2341,7 @@ MULTI_THREAD_TEST_F( class LayerTreeHostTestAbortedCommitDoesntStallDisabledVsync : public LayerTreeHostTestAbortedCommitDoesntStall { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { LayerTreeHostTestAbortedCommitDoesntStall::InitializeSettings(settings); settings->throttle_frame_production = false; } @@ -2352,11 +2352,11 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestAbortedCommitDoesntStallDisabledVsync); class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<Layer> layer = PictureLayer::Create(&client_); @@ -2365,13 +2365,13 @@ class LayerTreeHostTestUninvertibleTransformDoesNotBlockActivation layer_tree_host()->root_layer()->AddChild(layer); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; }; @@ -2391,13 +2391,13 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents virtual void PaintContents( SkCanvas* canvas, const gfx::Rect& clip, - ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE { + ContentLayerClient::GraphicsContextStatus gc_status) override { layer_->SetBounds(gfx::Size(2, 2)); } - virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} + virtual void DidChangeLayerCanUseLCDText() override {} - virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } + virtual bool FillsBoundsCompletely() const override { return false; } private: Layer* layer_; @@ -2405,7 +2405,7 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_); root_layer->SetIsDrawable(true); root_layer->SetBounds(gfx::Size(1, 1)); @@ -2416,10 +2416,10 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } - virtual void AfterTest() OVERRIDE {} + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } + virtual void AfterTest() override {} - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { num_commits_++; if (num_commits_ == 1) { LayerImpl* root_layer = host_impl->active_tree()->root_layer(); @@ -2445,7 +2445,7 @@ class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D { test_capabilities_.gpu.texture_rectangle = true; } - virtual GLuint createTexture() OVERRIDE { + virtual GLuint createTexture() override { return 1; } MOCK_METHOD1(activeTexture, void(GLenum texture)); @@ -2471,7 +2471,7 @@ class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D { class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { protected: virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { scoped_ptr<MockIOSurfaceWebGraphicsContext3D> mock_context_owned( new MockIOSurfaceWebGraphicsContext3D); mock_context_ = mock_context_owned.get(); @@ -2482,7 +2482,7 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { return FakeOutputSurface::Create3d(mock_context_owned.Pass()); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); layer_tree_host()->root_layer()->SetIsDrawable(false); @@ -2498,9 +2498,9 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { layer_tree_host()->root_layer()->AddChild(io_surface_layer); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_EQ(0u, host_impl->resource_provider()->num_resources()); // In WillDraw, the IOSurfaceLayer sets up the io surface texture. @@ -2541,7 +2541,7 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { Mock::VerifyAndClearExpectations(&mock_context_); ResourceProvider* resource_provider = host_impl->resource_provider(); EXPECT_EQ(1u, resource_provider->num_resources()); @@ -2573,14 +2573,14 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest { return draw_result; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { Mock::VerifyAndClearExpectations(&mock_context_); EXPECT_CALL(*mock_context_, deleteTexture(1)).Times(AtLeast(1)); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int io_surface_id_; MockIOSurfaceWebGraphicsContext3D* mock_context_; @@ -2591,7 +2591,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestIOSurfaceDrawing); class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { frame_ = 0; PostSetNeedsCommitToMainThread(); } @@ -2600,7 +2600,7 @@ class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest { // Round 2: commit only (no draw/swap) // Round 3: draw only (no commit) - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int commit = layer_tree_host()->source_frame_number(); switch (commit) { case 2: @@ -2611,7 +2611,7 @@ class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest { } } - virtual void DidCompleteSwapBuffers() OVERRIDE { + virtual void DidCompleteSwapBuffers() override { int commit = layer_tree_host()->source_frame_number(); ++frame_; switch (frame_) { @@ -2628,7 +2628,7 @@ class LayerTreeHostTestNumFramesPending : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} protected: int frame_; @@ -2645,12 +2645,12 @@ TEST_F(LayerTreeHostTestNumFramesPending, DISABLED_GLRenderer) { class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // PictureLayer can only be used with impl side painting enabled. settings->impl_side_painting = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { layer_ = FakePictureLayer::Create(&client_); // Force commits to not be aborted so new frames get drawn, otherwise // the renderer gets deferred initialized but nothing new needs drawing. @@ -2659,7 +2659,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { did_initialize_gl_ = false; did_release_gl_ = false; last_source_frame_number_drawn_ = -1; // Never drawn. @@ -2667,7 +2667,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { scoped_ptr<TestWebGraphicsContext3D> context3d( TestWebGraphicsContext3D::Create()); @@ -2676,7 +2676,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { delegating_renderer()); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { ASSERT_TRUE(host_impl->RootLayer()); FakePictureLayerImpl* layer_impl = static_cast<FakePictureLayerImpl*>(host_impl->RootLayer()); @@ -2733,7 +2733,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ASSERT_TRUE(result); DelegatedFrameData* delegated_frame_data = output_surface()->last_sent_frame().delegated_frame_data.get(); @@ -2750,7 +2750,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest { host_impl->ReclaimResources(&ack); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_TRUE(did_initialize_gl_); EXPECT_TRUE(did_release_gl_); } @@ -2767,7 +2767,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestDeferredInitialize); class LayerTreeHostTestDeferredInitializeWithGpuRasterization : public LayerTreeHostTestDeferredInitialize { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // PictureLayer can only be used with impl side painting enabled. settings->impl_side_painting = true; settings->gpu_rasterization_enabled = true; @@ -2782,13 +2782,13 @@ class LayerTreeHostTestUIResource : public LayerTreeHostTest { public: LayerTreeHostTestUIResource() : num_ui_resources_(0) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->texture_id_allocation_chunk_size = 1; } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int frame = layer_tree_host()->source_frame_number(); switch (frame) { case 1: @@ -2849,17 +2849,17 @@ class LayerTreeHostTestUIResource : public LayerTreeHostTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { if (!layer_tree_host()->settings().impl_side_painting) PerformTest(impl); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { if (layer_tree_host()->settings().impl_side_painting) PerformTest(impl); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: // Must clear all resources before exiting. @@ -2888,7 +2888,7 @@ class PushPropertiesCountingLayerImpl : public LayerImpl { virtual ~PushPropertiesCountingLayerImpl() {} - virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE { + virtual void PushPropertiesTo(LayerImpl* layer) override { LayerImpl::PushPropertiesTo(layer); push_properties_count_++; // Push state to the active tree because we can only access it from there. @@ -2897,7 +2897,7 @@ class PushPropertiesCountingLayerImpl : public LayerImpl { } virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) - OVERRIDE { + override { return PushPropertiesCountingLayerImpl::Create(tree_impl, id()); } @@ -2920,7 +2920,7 @@ class PushPropertiesCountingLayer : public Layer { return new PushPropertiesCountingLayer(); } - virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE { + virtual void PushPropertiesTo(LayerImpl* layer) override { Layer::PushPropertiesTo(layer); push_properties_count_++; if (persist_needs_push_properties_) @@ -2928,7 +2928,7 @@ class PushPropertiesCountingLayer : public Layer { } virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) - OVERRIDE { + override { return PushPropertiesCountingLayerImpl::Create(tree_impl, id()); } @@ -2954,7 +2954,7 @@ class PushPropertiesCountingLayer : public Layer { class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { num_commits_ = 0; expected_push_properties_root_ = 0; expected_push_properties_child_ = 0; @@ -2965,7 +2965,7 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = PushPropertiesCountingLayer::Create(); child_ = PushPropertiesCountingLayer::Create(); child2_ = PushPropertiesCountingLayer::Create(); @@ -2984,7 +2984,7 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { ++num_commits_; EXPECT_EQ(expected_push_properties_root_, root_->push_properties_count()); @@ -3124,7 +3124,7 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest { ++expected_push_properties_leaf_layer_; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int num_commits_; FakeContentLayerClient client_; @@ -3147,7 +3147,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestLayersPushProperties); class LayerTreeHostTestImplLayersPushProperties : public LayerTreeHostTestLayersPushProperties { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { expected_push_properties_root_impl_ = 0; expected_push_properties_child_impl_ = 0; expected_push_properties_grandchild_impl_ = 0; @@ -3156,7 +3156,7 @@ class LayerTreeHostTestImplLayersPushProperties LayerTreeHostTestLayersPushProperties::BeginTest(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { // These commits are in response to the changes made in // LayerTreeHostTestLayersPushProperties::DidCommitAndDrawFrame() switch (num_commits_) { @@ -3347,9 +3347,9 @@ TEST_F(LayerTreeHostTestImplLayersPushProperties, DelegatingRenderer) { class LayerTreeHostTestPropertyChangesDuringUpdateArePushed : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = Layer::Create(); root_->SetBounds(gfx::Size(1, 1)); @@ -3364,7 +3364,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed LayerTreeHostTest::SetupTree(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 0: break; @@ -3393,7 +3393,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} scoped_refptr<Layer> root_; scoped_refptr<FakePaintedScrollbarLayer> scrollbar_layer_; @@ -3403,9 +3403,9 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestPropertyChangesDuringUpdateArePushed); class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = PushPropertiesCountingLayer::Create(); child_ = PushPropertiesCountingLayer::Create(); root_->AddChild(child_); @@ -3414,7 +3414,7 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 0: break; @@ -3446,7 +3446,7 @@ class LayerTreeHostTestSetDrawableCausesCommit : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} scoped_refptr<PushPropertiesCountingLayer> root_; scoped_refptr<PushPropertiesCountingLayer> child_; @@ -3457,7 +3457,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestSetDrawableCausesCommit); class LayerTreeHostTestCasePushPropertiesThreeGrandChildren : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { expected_push_properties_root_ = 0; expected_push_properties_child_ = 0; expected_push_properties_grandchild1_ = 0; @@ -3466,7 +3466,7 @@ class LayerTreeHostTestCasePushPropertiesThreeGrandChildren PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = PushPropertiesCountingLayer::Create(); child_ = PushPropertiesCountingLayer::Create(); grandchild1_ = PushPropertiesCountingLayer::Create(); @@ -3482,7 +3482,7 @@ class LayerTreeHostTestCasePushPropertiesThreeGrandChildren LayerTreeHostTest::SetupTree(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<PushPropertiesCountingLayer> root_; @@ -3500,7 +3500,7 @@ class LayerTreeHostTestCasePushPropertiesThreeGrandChildren class LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3540,7 +3540,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestPushPropertiesAddingToTreeRequiresPush); class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursion : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3623,7 +3623,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestPushPropertiesRemovingChildStopsRecursion); class LayerTreeHostTestPushPropertiesRemovingChildStopsRecursionWithPersistence : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3671,7 +3671,7 @@ MULTI_THREAD_TEST_F( class LayerTreeHostTestPushPropertiesSetPropertiesWhileOutsideTree : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3739,7 +3739,7 @@ MULTI_THREAD_TEST_F( class LayerTreeHostTestPushPropertiesSetPropertyInParentThenChild : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3803,7 +3803,7 @@ MULTI_THREAD_TEST_F( class LayerTreeHostTestPushPropertiesSetPropertyInChildThenParent : public LayerTreeHostTestCasePushPropertiesThreeGrandChildren { protected: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { int last_source_frame_number = layer_tree_host()->source_frame_number() - 1; switch (last_source_frame_number) { case 0: @@ -3870,7 +3870,7 @@ class LayerTreeHostTestTreeActivationCallback : public LayerTreeHostTest { LayerTreeHostTestTreeActivationCallback() : num_commits_(0), callback_count_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { EXPECT_TRUE(HasImplThread()); PostSetNeedsCommitToMainThread(); } @@ -3878,7 +3878,7 @@ class LayerTreeHostTestTreeActivationCallback : public LayerTreeHostTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { ++num_commits_; switch (num_commits_) { case 1: @@ -3907,7 +3907,7 @@ class LayerTreeHostTestTreeActivationCallback : public LayerTreeHostTest { host_impl, frame_data, draw_result); } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(3, num_commits_); } + virtual void AfterTest() override { EXPECT_EQ(3, num_commits_); } void SetCallback(bool enable) { output_surface()->SetTreeActivationCallback( @@ -3936,7 +3936,7 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest { public: LayerInvalidateCausesDraw() : num_commits_(0), num_draws_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { ASSERT_TRUE(!!invalidate_layer_.get()) << "Derived tests must set this in SetupTree"; @@ -3944,23 +3944,23 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { // After commit, invalidate the layer. This should cause a commit. if (layer_tree_host()->source_frame_number() == 1) invalidate_layer_->SetNeedsDisplay(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { num_draws_++; if (impl->active_tree()->source_frame_number() == 1) EndTest(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { num_commits_++; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_GE(2, num_commits_); EXPECT_GE(2, num_draws_); } @@ -3978,7 +3978,7 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest { // response to that invalidation. class LayerTreeHostTestVideoLayerInvalidate : public LayerInvalidateCausesDraw { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<VideoLayer> video_layer = VideoLayer::Create(&provider_, media::VIDEO_ROTATION_0); @@ -4001,7 +4001,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestVideoLayerInvalidate); class LayerTreeHostTestIOSurfaceLayerInvalidate : public LayerInvalidateCausesDraw { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<IOSurfaceLayer> layer = IOSurfaceLayer::Create(); layer->SetBounds(gfx::Size(10, 10)); @@ -4020,7 +4020,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_ = Layer::Create(); root_layer_->SetPosition(gfx::Point()); root_layer_->SetBounds(gfx::Size(10, 10)); @@ -4041,9 +4041,9 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: // The layer type used does not need to push properties every frame. @@ -4063,7 +4063,7 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest { } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root = impl->active_tree()->root_layer(); LayerImpl* parent = root->children()[0]; LayerImpl* child = parent->children()[0]; @@ -4075,7 +4075,7 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} scoped_refptr<Layer> root_layer_; scoped_refptr<SolidColorLayer> parent_layer_; @@ -4086,11 +4086,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPushHiddenLayer); class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_layer_ = FakePictureLayer::Create(&client_); root_layer_->SetBounds(gfx::Size(10, 10)); @@ -4098,21 +4098,21 @@ class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // The viewport is empty, but we still need to update layers on the main // thread. layer_tree_host()->SetViewportSize(gfx::Size(0, 0)); PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { // The layer should be updated even though the viewport is empty, so we // are capable of drawing it on the impl tree. EXPECT_GT(root_layer_->update_count(), 0u); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<FakePictureLayer> root_layer_; @@ -4126,7 +4126,7 @@ class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest { : num_will_begin_main_frames_(0), num_impl_commits_(0) {} protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<SolidColorLayer> root_layer = SolidColorLayer::Create(); root_layer->SetBounds(gfx::Size(200, 200)); root_layer->SetIsDrawable(true); @@ -4135,9 +4135,9 @@ class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void WillBeginMainFrame() OVERRIDE { + virtual void WillBeginMainFrame() override { num_will_begin_main_frames_++; switch (num_will_begin_main_frames_) { case 2: @@ -4148,11 +4148,11 @@ class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest { } } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { num_impl_commits_++; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { switch (impl->SourceAnimationFrameNumber()) { case 1: // Prevent draws until commit. @@ -4167,7 +4167,7 @@ class LayerTreeHostTestAbortEvictedTextures : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Ensure that the commit was truly aborted. EXPECT_EQ(2, num_will_begin_main_frames_); EXPECT_EQ(1, num_impl_commits_); @@ -4183,12 +4183,12 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestAbortEvictedTextures); class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { scoped_refptr<TestContextProvider> context_provider = TestContextProvider::Create(); context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024); @@ -4198,7 +4198,7 @@ class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { return FakeOutputSurface::Create3d(context_provider); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { client_.set_fill_with_nonsolid_color(true); scoped_refptr<FakePictureLayer> root_layer = FakePictureLayer::Create(&client_); @@ -4209,9 +4209,9 @@ class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { TestWebGraphicsContext3D* context = TestContext(); // Expect that the transfer buffer memory used is equal to the @@ -4220,7 +4220,7 @@ class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -4235,14 +4235,14 @@ class LayerTreeHostTestMemoryLimits : public LayerTreeHostTest { public: LayerTreeHostTestMemoryLimits() : num_commits_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void WillCommit() OVERRIDE { + virtual void WillCommit() override { // Some commits are aborted, so increment number of attempted commits here. num_commits_++; } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (num_commits_) { case 1: // Verify default values. @@ -4287,7 +4287,7 @@ class LayerTreeHostTestMemoryLimits : public LayerTreeHostTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { switch (num_commits_) { case 1: break; @@ -4312,7 +4312,7 @@ class LayerTreeHostTestMemoryLimits : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_commits_; @@ -4330,7 +4330,7 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface second_output_surface_memory_limit_(1234321) {} virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { if (!first_context_provider_.get()) { first_context_provider_ = TestContextProvider::Create(); } else { @@ -4355,16 +4355,16 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface return output_surface.Pass(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); layer_tree_host()->SetRootLayer(root_); LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { // Lost context sometimes takes two frames to recreate. The third frame // is sometimes aborted, so wait until the fourth frame to verify that // the memory has been set, and the fifth frame to end the test. @@ -4376,7 +4376,7 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface } virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl, - bool result) OVERRIDE { + bool result) override { switch (impl->active_tree()->source_frame_number()) { case 1: EXPECT_EQ(first_output_surface_memory_limit_, @@ -4392,7 +4392,7 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} scoped_refptr<TestContextProvider> first_context_provider_; scoped_refptr<TestContextProvider> second_context_provider_; @@ -4429,14 +4429,14 @@ class TestSwapPromise : public SwapPromise { result_->dtor_called = true; } - virtual void DidSwap(CompositorFrameMetadata* metadata) OVERRIDE { + virtual void DidSwap(CompositorFrameMetadata* metadata) override { base::AutoLock lock(result_->lock); EXPECT_FALSE(result_->did_swap_called); EXPECT_FALSE(result_->did_not_swap_called); result_->did_swap_called = true; } - virtual void DidNotSwap(DidNotSwapReason reason) OVERRIDE { + virtual void DidNotSwap(DidNotSwapReason reason) override { base::AutoLock lock(result_->lock); EXPECT_FALSE(result_->did_swap_called); EXPECT_FALSE(result_->did_not_swap_called); @@ -4444,7 +4444,7 @@ class TestSwapPromise : public SwapPromise { result_->reason = reason; } - virtual int64 TraceId() const OVERRIDE { return 0; } + virtual int64 TraceId() const override { return 0; } private: // Not owned. @@ -4456,16 +4456,16 @@ class LayerTreeHostTestBreakSwapPromise : public LayerTreeHostTest { LayerTreeHostTestBreakSwapPromise() : commit_count_(0), commit_complete_count_(0) {} - virtual void WillBeginMainFrame() OVERRIDE { + virtual void WillBeginMainFrame() override { ASSERT_LE(commit_count_, 2); scoped_ptr<SwapPromise> swap_promise( new TestSwapPromise(&swap_promise_result_[commit_count_])); layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { commit_count_++; if (commit_count_ == 2) { // This commit will finish. @@ -4473,7 +4473,7 @@ class LayerTreeHostTestBreakSwapPromise : public LayerTreeHostTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { commit_complete_count_++; if (commit_complete_count_ == 1) { // This commit will be aborted because no actual update. @@ -4483,7 +4483,7 @@ class LayerTreeHostTestBreakSwapPromise : public LayerTreeHostTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // 3 commits are scheduled. 2 completes. 1 is aborted. EXPECT_EQ(commit_count_, 3); EXPECT_EQ(commit_complete_count_, 2); @@ -4527,14 +4527,14 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestBreakSwapPromise); class LayerTreeHostTestBreakSwapPromiseForVisibilityAbortedCommit : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { layer_tree_host()->SetDeferCommits(true); layer_tree_host()->SetNeedsCommit(); } - virtual void DidDeferCommit() OVERRIDE { + virtual void DidDeferCommit() override { layer_tree_host()->SetVisible(false); scoped_ptr<SwapPromise> swap_promise( new TestSwapPromise(&swap_promise_result_)); @@ -4543,11 +4543,11 @@ class LayerTreeHostTestBreakSwapPromiseForVisibilityAbortedCommit } virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, - bool did_handle) OVERRIDE { + bool did_handle) override { EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { { base::AutoLock lock(swap_promise_result_.lock); EXPECT_FALSE(swap_promise_result_.did_swap_called); @@ -4566,16 +4566,16 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostTestBreakSwapPromiseForContextAbortedCommit : public LayerTreeHostTest { protected: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (TestEnded()) return; layer_tree_host()->SetDeferCommits(true); layer_tree_host()->SetNeedsCommit(); } - virtual void DidDeferCommit() OVERRIDE { + virtual void DidDeferCommit() override { layer_tree_host()->DidLoseOutputSurface(); scoped_ptr<SwapPromise> swap_promise( new TestSwapPromise(&swap_promise_result_)); @@ -4584,7 +4584,7 @@ class LayerTreeHostTestBreakSwapPromiseForContextAbortedCommit } virtual void BeginMainFrameAbortedOnThread(LayerTreeHostImpl* host_impl, - bool did_handle) OVERRIDE { + bool did_handle) override { EndTest(); // This lets the test finally commit and exit. MainThreadTaskRunner()->PostTask( @@ -4598,7 +4598,7 @@ class LayerTreeHostTestBreakSwapPromiseForContextAbortedCommit layer_tree_host()->OnCreateAndInitializeOutputSurfaceAttempted(true); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { { base::AutoLock lock(swap_promise_result_.lock); EXPECT_FALSE(swap_promise_result_.did_swap_called); @@ -4625,15 +4625,15 @@ class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { virtual ~SimpleSwapPromiseMonitor() {} - virtual void OnSetNeedsCommitOnMain() OVERRIDE { + virtual void OnSetNeedsCommitOnMain() override { (*set_needs_commit_count_)++; } - virtual void OnSetNeedsRedrawOnImpl() OVERRIDE { + virtual void OnSetNeedsRedrawOnImpl() override { ADD_FAILURE() << "Should not get called on main thread."; } - virtual void OnForwardScrollUpdateToMainThreadOnImpl() OVERRIDE { + virtual void OnForwardScrollUpdateToMainThreadOnImpl() override { ADD_FAILURE() << "Should not get called on main thread."; } @@ -4643,9 +4643,9 @@ class SimpleSwapPromiseMonitor : public SwapPromiseMonitor { class LayerTreeHostTestSimpleSwapPromiseMonitor : public LayerTreeHostTest { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void WillBeginMainFrame() OVERRIDE { + virtual void WillBeginMainFrame() override { if (TestEnded()) return; @@ -4694,7 +4694,7 @@ class LayerTreeHostTestSimpleSwapPromiseMonitor : public LayerTreeHostTest { EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); @@ -4702,18 +4702,18 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); class LayerTreeHostTestHighResRequiredAfterEvictingUIResources : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); ui_resource_ = FakeScopedUIResource::Create(layer_tree_host()); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { host_impl->EvictAllUIResources(); // Existence of evicted UI resources will trigger NEW_CONTENT_TAKES_PRIORITY // mode. Active tree should require high-res to draw after entering this @@ -4722,7 +4722,7 @@ class LayerTreeHostTestHighResRequiredAfterEvictingUIResources EXPECT_TRUE(host_impl->active_tree()->RequiresHighResToDraw()); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int frame = layer_tree_host()->source_frame_number(); switch (frame) { case 1: @@ -4735,7 +4735,7 @@ class LayerTreeHostTestHighResRequiredAfterEvictingUIResources } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_ptr<FakeScopedUIResource> ui_resource_; @@ -4746,14 +4746,14 @@ class LayerTreeHostTestHighResRequiredAfterEvictingUIResources class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; EXPECT_FALSE(settings->gpu_rasterization_enabled); EXPECT_FALSE(settings->gpu_rasterization_forced); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_); @@ -4762,7 +4762,7 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest { layer_tree_host()->root_layer()->AddChild(layer); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { Layer* root = layer_tree_host()->root_layer(); PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0)); PicturePile* pile = layer->GetPicturePileForTesting(); @@ -4782,18 +4782,18 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization()); EXPECT_FALSE(host_impl->use_gpu_rasterization()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization()); EXPECT_FALSE(host_impl->use_gpu_rasterization()); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient layer_client_; }; @@ -4802,14 +4802,14 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestGpuRasterizationDefault); class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; EXPECT_FALSE(settings->gpu_rasterization_enabled); settings->gpu_rasterization_enabled = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_); @@ -4818,7 +4818,7 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest { layer_tree_host()->root_layer()->AddChild(layer); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { Layer* root = layer_tree_host()->root_layer(); PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0)); PicturePile* pile = layer->GetPicturePileForTesting(); @@ -4847,18 +4847,18 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization()); EXPECT_FALSE(host_impl->use_gpu_rasterization()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization()); EXPECT_FALSE(host_impl->use_gpu_rasterization()); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient layer_client_; }; @@ -4867,14 +4867,14 @@ MULTI_THREAD_TEST_F(LayerTreeHostTestGpuRasterizationEnabled); class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; EXPECT_FALSE(settings->gpu_rasterization_forced); settings->gpu_rasterization_forced = true; } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostTest::SetupTree(); scoped_refptr<PictureLayer> layer = PictureLayer::Create(&layer_client_); @@ -4883,7 +4883,7 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest { layer_tree_host()->root_layer()->AddChild(layer); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { Layer* root = layer_tree_host()->root_layer(); PictureLayer* layer = static_cast<PictureLayer*>(root->child_at(0)); PicturePile* pile = layer->GetPicturePileForTesting(); @@ -4912,18 +4912,18 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_TRUE(host_impl->pending_tree()->use_gpu_rasterization()); EXPECT_TRUE(host_impl->use_gpu_rasterization()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_TRUE(host_impl->active_tree()->use_gpu_rasterization()); EXPECT_TRUE(host_impl->use_gpu_rasterization()); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient layer_client_; }; @@ -4938,7 +4938,7 @@ class LayerTreeHostTestContinuousPainting : public LayerTreeHostTest { protected: enum { kExpectedNumCommits = 10 }; - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root_layer = Layer::Create(); root_layer->SetBounds(bounds_); @@ -4958,7 +4958,7 @@ class LayerTreeHostTestContinuousPainting : public LayerTreeHostTest { LayerTreeHostTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { MainThreadTaskRunner()->PostTask( FROM_HERE, base::Bind( @@ -4976,11 +4976,11 @@ class LayerTreeHostTestContinuousPainting : public LayerTreeHostTest { milliseconds_per_frame)); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { child_layer_->SetNeedsDisplay(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_LE(kExpectedNumCommits, num_commits_); EXPECT_LE(kExpectedNumCommits, num_draws_); int update_count = content_layer_.get() @@ -4989,12 +4989,12 @@ class LayerTreeHostTestContinuousPainting : public LayerTreeHostTest { EXPECT_LE(kExpectedNumCommits, update_count); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (++num_draws_ == kExpectedNumCommits) EndTest(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { ++num_commits_; } @@ -5028,24 +5028,24 @@ class LayerTreeHostTestActivateOnInvisible : public LayerTreeHostTest { LayerTreeHostTestActivateOnInvisible() : activation_count_(0), visible_(true) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // Kick off the test with a commit. PostSetNeedsCommitToMainThread(); } - virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override { // Make sure we don't activate using the notify signal from tile manager. host_impl->BlockNotifyReadyToActivateForTesting(true); } - virtual void DidCommit() OVERRIDE { layer_tree_host()->SetVisible(false); } + virtual void DidCommit() override { layer_tree_host()->SetVisible(false); } virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl, - bool visible) OVERRIDE { + bool visible) override { visible_ = visible; // Once invisible, we can go visible again. @@ -5057,12 +5057,12 @@ class LayerTreeHostTestActivateOnInvisible : public LayerTreeHostTest { } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { ++activation_count_; EXPECT_FALSE(visible_); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Ensure we activated even though the signal was blocked. EXPECT_EQ(1, activation_count_); EXPECT_TRUE(visible_); diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index da4acb9..593c5c7 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc @@ -21,7 +21,7 @@ namespace { class LayerTreeHostAnimationTest : public LayerTreeTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeTest::SetupTree(); layer_tree_host()->root_layer()->set_layer_animation_delegate(this); } @@ -35,11 +35,11 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested() : num_commits_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { // We skip the first commit because its the commit that populates the // impl thread with a tree. After the second commit, the test is done. if (num_commits_ != 1) @@ -52,7 +52,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested // verify that CommitRequested has gone back to false. } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (!num_commits_) { EXPECT_FALSE(layer_tree_host()->CommitRequested()); layer_tree_host()->SetNeedsAnimate(); @@ -66,7 +66,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested num_commits_++; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_commits_; @@ -86,11 +86,11 @@ class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() : num_begin_frames_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { if (!num_begin_frames_) { layer_tree_host()->SetNeedsAnimate(); num_begin_frames_++; @@ -99,7 +99,7 @@ class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_begin_frames_; @@ -117,13 +117,13 @@ class LayerTreeHostAnimationTestAddAnimation LayerTreeHostAnimationTestAddAnimation() : num_begin_frames_(0), received_animation_started_notification_(false) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddInstantAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void UpdateAnimationState( LayerTreeHostImpl* host_impl, - bool has_unfinished_animation) OVERRIDE { + bool has_unfinished_animation) override { if (!num_begin_frames_) { // The animation had zero duration so LayerTreeHostImpl should no // longer need to animate its layers. @@ -148,7 +148,7 @@ class LayerTreeHostAnimationTestAddAnimation virtual void NotifyAnimationStarted( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { received_animation_started_notification_ = true; start_time_ = monotonic_time; if (num_begin_frames_) { @@ -165,7 +165,7 @@ class LayerTreeHostAnimationTestAddAnimation } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_begin_frames_; @@ -183,17 +183,17 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws() : started_animating_(false) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void AnimateLayers( LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { started_animating_ = true; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { if (started_animating_) EndTest(); } @@ -201,11 +201,11 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS; } - virtual void AfterTest() OVERRIDE { } + virtual void AfterTest() override { } private: bool started_animating_; @@ -221,13 +221,13 @@ class LayerTreeHostAnimationTestAnimationsGetDeleted LayerTreeHostAnimationTestAnimationsGetDeleted() : started_animating_(false) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void AnimateLayers( LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { bool have_animations = !host_impl->animation_registrar()-> active_animation_controllers().empty(); if (!started_animating_ && have_animations) { @@ -241,13 +241,13 @@ class LayerTreeHostAnimationTestAnimationsGetDeleted virtual void NotifyAnimationFinished( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { // Animations on the impl-side controller only get deleted during a commit, // so we need to schedule a commit. layer_tree_host()->SetNeedsCommit(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: bool started_animating_; @@ -262,7 +262,7 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded LayerTreeHostAnimationTestTickAnimationWhileBackgrounded() : num_begin_frames_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddLongAnimationToMainThread(layer_tree_host()->root_layer()); } @@ -271,7 +271,7 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded // mode. virtual void WillAnimateLayers( LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { // Verify that the host can draw, it's just not visible. EXPECT_TRUE(host_impl->CanDraw()); if (num_begin_frames_ < 2) { @@ -286,7 +286,7 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_begin_frames_; @@ -304,18 +304,18 @@ class LayerTreeHostAnimationTestAnimationTickTimeIsMonotonic LayerTreeHostAnimationTestAnimationTickTimeIsMonotonic() : has_background_ticked_(false), num_foreground_animates_(0) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // Make sure that drawing many times doesn't cause a checkerboarded // animation to start so we avoid flake in this test. settings->timeout_and_draw_when_animation_checkerboards = false; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddLongAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void AnimateLayers(LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { EXPECT_GE(monotonic_time, last_tick_time_); last_tick_time_ = monotonic_time; if (host_impl->visible()) { @@ -333,13 +333,13 @@ class LayerTreeHostAnimationTestAnimationTickTimeIsMonotonic virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { if (TestEnded()) return draw_result; return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: bool has_background_ticked_; @@ -358,22 +358,22 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree() : active_tree_was_animated_(false) {} - virtual base::TimeDelta LowFrequencyAnimationInterval() const OVERRIDE { + virtual base::TimeDelta LowFrequencyAnimationInterval() const override { return base::TimeDelta::FromMilliseconds(4); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void NotifyAnimationFinished( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { // Replace animated commits with an empty tree. layer_tree_host()->SetRootLayer(make_scoped_refptr<Layer>(NULL)); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { // This alternates setting an empty tree and a non-empty tree with an // animation. switch (layer_tree_host()->source_frame_number()) { @@ -394,14 +394,14 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree } } - virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override { // At the start of every commit, block activations and make sure // we are backgrounded. host_impl->BlockNotifyReadyToActivateForTesting(true); PostSetVisibleToMainThread(false); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { if (!host_impl->settings().impl_side_painting) { // There are no activations to block if we're not impl-side-painting, // so just advance the test immediately. @@ -429,7 +429,7 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree host_impl->BlockNotifyReadyToActivateForTesting(false); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { active_tree_was_animated_ = false; // Verify that commits are actually alternating with empty / non-empty @@ -463,7 +463,7 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree } virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { EXPECT_TRUE(host_impl->active_tree()->root_layer()); active_tree_was_animated_ = true; } @@ -477,7 +477,7 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree PostSetVisibleToMainThread(true); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} bool active_tree_was_animated_; }; @@ -491,20 +491,20 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction public: LayerTreeHostAnimationTestAddAnimationWithTimingFunction() {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = FakeContentLayer::Create(&client_); content_->SetBounds(gfx::Size(4, 4)); layer_tree_host()->root_layer()->AddChild(content_); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(content_.get()); } virtual void AnimateLayers( LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { LayerAnimationController* controller_impl = host_impl->active_tree()->root_layer()->children()[0]-> layer_animation_controller(); @@ -528,7 +528,7 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<FakeContentLayer> content_; @@ -546,7 +546,7 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes : main_start_time_(-1.0), impl_start_time_(-1.0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = FakeContentLayer::Create(&client_); content_->SetBounds(gfx::Size(4, 4)); @@ -554,13 +554,13 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes layer_tree_host()->root_layer()->AddChild(content_); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(content_.get()); } virtual void NotifyAnimationStarted( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { LayerAnimationController* controller = layer_tree_host()->root_layer()->children()[0]-> layer_animation_controller(); @@ -576,7 +576,7 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes virtual void UpdateAnimationState( LayerTreeHostImpl* impl_host, - bool has_unfinished_animation) OVERRIDE { + bool has_unfinished_animation) override { LayerAnimationController* controller = impl_host->active_tree()->root_layer()->children()[0]-> layer_animation_controller(); @@ -593,7 +593,7 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_FLOAT_EQ(impl_start_time_, main_start_time_); } @@ -613,13 +613,13 @@ class LayerTreeHostAnimationTestAnimationFinishedEvents public: LayerTreeHostAnimationTestAnimationFinishedEvents() {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddInstantAnimationToMainThread(layer_tree_host()->root_layer()); } virtual void NotifyAnimationFinished( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { LayerAnimationController* controller = layer_tree_host()->root_layer()->layer_animation_controller(); Animation* animation = @@ -629,7 +629,7 @@ class LayerTreeHostAnimationTestAnimationFinishedEvents EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; SINGLE_AND_MULTI_THREAD_TEST_F( @@ -644,17 +644,17 @@ class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity : update_check_layer_(FakeContentLayer::Create(&client_)) { } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { update_check_layer_->SetOpacity(0.f); layer_tree_host()->SetRootLayer(update_check_layer_); LayerTreeHostAnimationTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(update_check_layer_.get()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { LayerAnimationController* controller_impl = host_impl->active_tree()->root_layer()->layer_animation_controller(); Animation* animation_impl = @@ -663,7 +663,7 @@ class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Update() should have been called once, proving that the layer was not // skipped. EXPECT_EQ(1u, update_check_layer_->update_count()); @@ -687,11 +687,11 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation public: LayerTreeHostAnimationTestLayerAddedWithAnimation() {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (layer_tree_host()->source_frame_number() == 1) { scoped_refptr<Layer> layer = Layer::Create(); layer->set_layer_animation_delegate(this); @@ -710,11 +710,11 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation virtual void AnimateLayers( LayerTreeHostImpl* impl_host, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; SINGLE_AND_MULTI_THREAD_TEST_F( @@ -726,9 +726,9 @@ class LayerTreeHostAnimationTestCancelAnimateCommit LayerTreeHostAnimationTestCancelAnimateCommit() : num_begin_frames_(0), num_commit_calls_(0), num_draw_calls_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { num_begin_frames_++; // No-op animate will cancel the commit. if (layer_tree_host()->source_frame_number() == 1) { @@ -738,19 +738,19 @@ class LayerTreeHostAnimationTestCancelAnimateCommit layer_tree_host()->SetNeedsAnimate(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { num_commit_calls_++; if (impl->active_tree()->source_frame_number() > 1) FAIL() << "Commit should have been canceled."; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { num_draw_calls_++; if (impl->active_tree()->source_frame_number() > 1) FAIL() << "Draw should have been canceled."; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(2, num_begin_frames_); EXPECT_EQ(1, num_commit_calls_); EXPECT_EQ(1, num_draw_calls_); @@ -772,23 +772,23 @@ class LayerTreeHostAnimationTestForceRedraw LayerTreeHostAnimationTestForceRedraw() : num_animate_(0), num_draw_layers_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { if (++num_animate_ < 2) layer_tree_host()->SetNeedsAnimate(); } - virtual void Layout() OVERRIDE { + virtual void Layout() override { layer_tree_host()->SetNextCommitForcesRedraw(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (++num_draw_layers_ == 2) EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // The first commit will always draw; make sure the second draw triggered // by the animation was not cancelled. EXPECT_EQ(2, num_draw_layers_); @@ -808,21 +808,21 @@ class LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit LayerTreeHostAnimationTestAnimateAfterSetNeedsCommit() : num_animate_(0), num_draw_layers_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { if (++num_animate_ <= 2) { layer_tree_host()->SetNeedsCommit(); layer_tree_host()->SetNeedsAnimate(); } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (++num_draw_layers_ == 2) EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // The first commit will always draw; make sure the second draw triggered // by the SetNeedsCommit was not cancelled. EXPECT_EQ(2, num_draw_layers_); @@ -843,7 +843,7 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw public: LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw() : started_times_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = FakeContentLayer::Create(&client_); content_->SetBounds(gfx::Size(4, 4)); @@ -851,24 +851,24 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw layer_tree_host()->root_layer()->AddChild(content_); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { layer_tree_host()->SetViewportSize(gfx::Size()); PostAddAnimationToMainThread(content_.get()); } virtual void NotifyAnimationStarted( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { started_times_++; } virtual void NotifyAnimationFinished( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(1, started_times_); } @@ -888,7 +888,7 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotVisible public: LayerTreeHostAnimationTestRunAnimationWhenNotVisible() : started_times_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = FakeContentLayer::Create(&client_); content_->SetBounds(gfx::Size(4, 4)); @@ -896,32 +896,32 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotVisible layer_tree_host()->root_layer()->AddChild(content_); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { visible_ = true; PostAddAnimationToMainThread(content_.get()); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { visible_ = false; layer_tree_host()->SetVisible(false); } virtual void NotifyAnimationStarted( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { EXPECT_FALSE(visible_); started_times_++; } virtual void NotifyAnimationFinished( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { EXPECT_FALSE(visible_); EXPECT_EQ(1, started_times_); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: bool visible_; @@ -937,7 +937,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( // checkerboard. class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations : public LayerTreeHostAnimationTest { - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = FakeContentLayer::Create(&client_); content_->SetBounds(gfx::Size(4, 4)); @@ -945,13 +945,13 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations layer_tree_host()->root_layer()->AddChild(content_); } - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // Make sure that drawing many times doesn't cause a checkerboarded // animation to start so we avoid flake in this test. settings->timeout_and_draw_when_animation_checkerboards = false; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { prevented_draw_ = 0; added_animations_ = 0; started_times_ = 0; @@ -962,7 +962,7 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { if (added_animations_ < 2) return draw_result; if (TestEnded()) @@ -974,7 +974,7 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS; } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: // The animation is longer than 1 BeginFrame interval. @@ -991,13 +991,13 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations virtual void NotifyAnimationStarted( base::TimeTicks monotonic_time, - Animation::TargetProperty target_property) OVERRIDE { + Animation::TargetProperty target_property) override { if (TestEnded()) return; started_times_++; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Make sure we tried to draw the second animation but failed. EXPECT_LT(0, prevented_draw_); // The first animation should be started, but the second should not because @@ -1023,7 +1023,7 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated public: LayerTreeHostAnimationTestScrollOffsetChangesArePropagated() {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); scroll_layer_ = FakeContentLayer::Create(&client_); @@ -1033,11 +1033,11 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated layer_tree_host()->root_layer()->AddChild(scroll_layer_); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: { scoped_ptr<ScrollOffsetAnimationCurve> curve( @@ -1062,7 +1062,7 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: FakeContentLayerClient client_; @@ -1080,22 +1080,22 @@ class LayerTreeHostAnimationTestFrozenAnimationTickTime LayerTreeHostAnimationTestFrozenAnimationTickTime() : started_animating_(false), num_commits_(0), num_draw_attempts_(2) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // Make sure that drawing many times doesn't cause a checkerboarded // animation to start so we avoid flake in this test. settings->timeout_and_draw_when_animation_checkerboards = false; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostAddAnimationToMainThread(layer_tree_host()->root_layer()); } - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE { + virtual void BeginMainFrame(const BeginFrameArgs& args) override { last_main_thread_tick_time_ = args.frame_time; } virtual void AnimateLayers(LayerTreeHostImpl* host_impl, - base::TimeTicks monotonic_time) OVERRIDE { + base::TimeTicks monotonic_time) override { if (TestEnded()) return; if (!started_animating_) { @@ -1110,7 +1110,7 @@ class LayerTreeHostAnimationTestFrozenAnimationTickTime virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { if (TestEnded()) return draw_result; num_draw_attempts_++; @@ -1121,7 +1121,7 @@ class LayerTreeHostAnimationTestFrozenAnimationTickTime return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS; } - virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override { if (!started_animating_) return; expected_impl_tick_time_ = @@ -1129,7 +1129,7 @@ class LayerTreeHostAnimationTestFrozenAnimationTickTime num_commits_++; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: bool started_animating_; @@ -1151,9 +1151,9 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers() : frame_count_with_pending_tree_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (layer_tree_host()->source_frame_number() == 1) { AddAnimatedTransformToLayer(layer_tree_host()->root_layer(), 4, 1, 1); } else if (layer_tree_host()->source_frame_number() == 2) { @@ -1168,11 +1168,11 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers } } - virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override { host_impl->BlockNotifyReadyToActivateForTesting(true); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { // For the commit that added animations to new and existing layers, keep // blocking activation. We want to verify that even with activation blocked, // the animation on the layer that's already in the active tree won't get a @@ -1183,7 +1183,7 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers } virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, - const BeginFrameArgs& args) OVERRIDE { + const BeginFrameArgs& args) override { if (!host_impl->pending_tree() || host_impl->pending_tree()->source_frame_number() != 2) return; @@ -1194,7 +1194,7 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers } virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl, - bool has_unfinished_animation) OVERRIDE { + bool has_unfinished_animation) override { LayerAnimationController* root_controller_impl = host_impl->active_tree()->root_layer()->layer_animation_controller(); Animation* root_animation = @@ -1215,7 +1215,7 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int frame_count_with_pending_tree_; @@ -1230,16 +1230,16 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating LayerTreeHostAnimationTestAddAnimationAfterAnimating() : num_swap_buffers_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostAnimationTest::SetupTree(); content_ = Layer::Create(); content_->SetBounds(gfx::Size(4, 4)); layer_tree_host()->root_layer()->AddChild(content_); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: // First frame: add an animation to the root layer. @@ -1254,7 +1254,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { // After both animations have started, verify that they have valid // start times. num_swap_buffers_++; @@ -1279,7 +1279,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: scoped_refptr<Layer> content_; diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc index 07e12a2..0f6bcaf 100644 --- a/cc/trees/layer_tree_host_unittest_context.cc +++ b/cc/trees/layer_tree_host_unittest_context.cc @@ -82,7 +82,7 @@ class LayerTreeHostContextTest : public LayerTreeTest { } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { if (times_to_fail_create_) { --times_to_fail_create_; ExpectCreateToFail(); @@ -106,7 +106,7 @@ class LayerTreeHostContextTest : public LayerTreeTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); if (!times_to_lose_during_draw_) return draw_result; @@ -120,7 +120,7 @@ class LayerTreeHostContextTest : public LayerTreeTest { return draw_result; } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { committed_at_least_once_ = true; if (!times_to_lose_during_commit_) @@ -132,11 +132,11 @@ class LayerTreeHostContextTest : public LayerTreeTest { times_to_fail_recreate_ = 0; } - virtual void DidFailToInitializeOutputSurface() OVERRIDE { + virtual void DidFailToInitializeOutputSurface() override { ++times_create_failed_; } - virtual void TearDown() OVERRIDE { + virtual void TearDown() override { LayerTreeTest::TearDown(); EXPECT_EQ(times_to_expect_create_failed_, times_create_failed_); } @@ -168,9 +168,9 @@ class LayerTreeHostContextTestLostContextSucceeds recovered_context_(true), first_initialized_(false) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void RequestNewOutputSurface(bool fallback) OVERRIDE { + virtual void RequestNewOutputSurface(bool fallback) override { if (async_output_surface_creation_) { MainThreadTaskRunner()->PostTask( FROM_HERE, @@ -188,7 +188,7 @@ class LayerTreeHostContextTestLostContextSucceeds LayerTreeHostContextTest::CreateOutputSurface(fallback)); } - virtual void DidInitializeOutputSurface() OVERRIDE { + virtual void DidInitializeOutputSurface() override { if (first_initialized_) ++num_losses_; else @@ -197,9 +197,9 @@ class LayerTreeHostContextTestLostContextSucceeds recovered_context_ = true; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(11u, test_case_); } + virtual void AfterTest() override { EXPECT_EQ(11u, test_case_); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { // If the last frame had a context loss, then we'll commit again to // recover. if (!recovered_context_) @@ -351,24 +351,24 @@ class LayerTreeHostClientNotReadyDoesNotCreateOutputSurface LayerTreeHostClientNotReadyDoesNotCreateOutputSurface() : LayerTreeHostContextTest() {} - virtual void WillBeginTest() OVERRIDE { + virtual void WillBeginTest() override { // Override and do not signal SetLayerTreeHostClientReady. } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); EndTest(); } virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) - OVERRIDE { + override { EXPECT_TRUE(false); return nullptr; } - virtual void DidInitializeOutputSurface() OVERRIDE { EXPECT_TRUE(false); } + virtual void DidInitializeOutputSurface() override { EXPECT_TRUE(false); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { } }; @@ -378,7 +378,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostContextTestLostContextSucceedsWithContent : public LayerTreeHostContextTestLostContextSucceeds { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = Layer::Create(); root_->SetBounds(gfx::Size(10, 10)); root_->SetIsDrawable(true); @@ -401,7 +401,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent LayerTreeHostContextTest::SetupTree(); } - virtual void InvalidateAndSetNeedsCommit() OVERRIDE { + virtual void InvalidateAndSetNeedsCommit() override { // Invalidate the render surface so we don't try to use a cached copy of the // surface. We want to make sure to test the drawing paths for drawing to // a child surface. @@ -409,7 +409,7 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent LayerTreeHostContextTestLostContextSucceeds::InvalidateAndSetNeedsCommit(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { if (!host_impl->settings().impl_side_painting) { FakeContentLayerImpl* content_impl = static_cast<FakeContentLayerImpl*>( host_impl->active_tree()->root_layer()->children()[0]); @@ -449,12 +449,12 @@ class LayerTreeHostContextTestCreateOutputSurfaceFails times_to_fail_create_ = times_to_fail_; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { scoped_ptr<FakeOutputSurface> surface = LayerTreeHostContextTest::CreateFakeOutputSurface(fallback); @@ -465,13 +465,13 @@ class LayerTreeHostContextTestCreateOutputSurfaceFails return surface.Pass(); } - virtual void DidInitializeOutputSurface() OVERRIDE { times_initialized_++; } + virtual void DidInitializeOutputSurface() override { times_initialized_++; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(times_to_fail_, times_create_failed_); EXPECT_NE(0, times_initialized_); EXPECT_EQ(expect_fallback_attempt_, did_attempt_fallback_); @@ -515,7 +515,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures num_commits_(0), lost_context_(false) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // Paint non-solid color. SkPaint paint; paint.setColor(SkColorSetARGB(100, 80, 200, 200)); @@ -534,7 +534,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } void PostEvictTextures() { if (HasImplThread()) { @@ -558,7 +558,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures } } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (num_commits_ > 1) return; if (!layer_tree_host()->settings().impl_side_painting) { @@ -567,7 +567,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures PostEvictTextures(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); if (num_commits_ > 1) return; @@ -578,7 +578,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (impl->settings().impl_side_painting) { FakePictureLayerImpl* picture_impl = static_cast<FakePictureLayerImpl*>(impl->active_tree()->root_layer()); @@ -594,9 +594,9 @@ class LayerTreeHostContextTestLostContextAndEvictTextures EndTest(); } - virtual void DidInitializeOutputSurface() OVERRIDE {} + virtual void DidInitializeOutputSurface() override {} - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} protected: bool lose_after_evict_; @@ -681,7 +681,7 @@ class LayerTreeHostContextTestLostContextWhileUpdatingResources LayerTreeHostContextTestLostContextWhileUpdatingResources() : num_children_(50), times_to_lose_on_end_query_(3) {} - virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() OVERRIDE { + virtual scoped_ptr<TestWebGraphicsContext3D> CreateContext3d() override { scoped_ptr<TestWebGraphicsContext3D> context = LayerTreeHostContextTest::CreateContext3d(); if (times_to_lose_on_end_query_) { @@ -691,7 +691,7 @@ class LayerTreeHostContextTestLostContextWhileUpdatingResources return context.Pass(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { if (layer_tree_host()->settings().impl_side_painting) parent_ = FakePictureLayer::Create(&client_); else @@ -714,14 +714,14 @@ class LayerTreeHostContextTestLostContextWhileUpdatingResources LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { EXPECT_EQ(0, times_to_lose_on_end_query_); EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(0, times_to_lose_on_end_query_); } @@ -740,7 +740,7 @@ class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest { LayerTreeHostContextTestLayersNotified() : LayerTreeHostContextTest(), num_commits_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { if (layer_tree_host()->settings().impl_side_painting) { root_ = FakePictureLayer::Create(&client_); child_ = FakePictureLayer::Create(&client_); @@ -758,9 +758,9 @@ class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest { LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { LayerTreeHostContextTest::DidActivateTreeOnThread(host_impl); FakePictureLayerImpl* root_picture = NULL; @@ -822,7 +822,7 @@ class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: int num_commits_; @@ -856,7 +856,7 @@ class LayerTreeHostContextTestDontUseLostResources static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { gpu::gles2::GLES2Interface* gl = child_output_surface_->context_provider()->ContextGL(); @@ -1012,9 +1012,9 @@ class LayerTreeHostContextTestDontUseLostResources LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(host_impl); if (host_impl->active_tree()->source_frame_number() == 3) { @@ -1029,7 +1029,7 @@ class LayerTreeHostContextTestDontUseLostResources virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { if (host_impl->active_tree()->source_frame_number() == 2) { // Lose the context during draw on the second commit. This will cause // a third commit to recover. @@ -1039,7 +1039,7 @@ class LayerTreeHostContextTestDontUseLostResources } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { // This will get called twice: // First when we create the initial output surface... if (layer_tree_host()->source_frame_number() > 0) { @@ -1049,7 +1049,7 @@ class LayerTreeHostContextTestDontUseLostResources return LayerTreeHostContextTest::CreateFakeOutputSurface(fallback); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { ASSERT_TRUE(layer_tree_host()->hud_layer()); // End the test once we know the 3nd frame drew. if (layer_tree_host()->source_frame_number() < 5) { @@ -1060,7 +1060,7 @@ class LayerTreeHostContextTestDontUseLostResources } } - virtual void AfterTest() OVERRIDE { EXPECT_TRUE(lost_context_); } + virtual void AfterTest() override { EXPECT_TRUE(lost_context_); } private: FakeContentLayerClient client_; @@ -1089,7 +1089,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources); class ImplSidePaintingLayerTreeHostContextTest : public LayerTreeHostContextTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } }; @@ -1097,7 +1097,7 @@ class ImplSidePaintingLayerTreeHostContextTest class LayerTreeHostContextTestImplSidePainting : public ImplSidePaintingLayerTreeHostContextTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root = Layer::Create(); root->SetBounds(gfx::Size(10, 10)); root->SetIsDrawable(true); @@ -1111,14 +1111,14 @@ class LayerTreeHostContextTestImplSidePainting LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { times_to_lose_during_commit_ = 1; PostSetNeedsCommitToMainThread(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} - virtual void DidInitializeOutputSurface() OVERRIDE { EndTest(); } + virtual void DidInitializeOutputSurface() override { EndTest(); } private: FakeContentLayerClient client_; @@ -1130,7 +1130,7 @@ class ScrollbarLayerLostContext : public LayerTreeHostContextTest { public: ScrollbarLayerLostContext() : commits_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { scoped_refptr<Layer> scroll_layer = Layer::Create(); scrollbar_layer_ = FakePaintedScrollbarLayer::Create(false, true, scroll_layer->id()); @@ -1140,9 +1140,9 @@ class ScrollbarLayerLostContext : public LayerTreeHostContextTest { PostSetNeedsCommitToMainThread(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); ++commits_; @@ -1174,11 +1174,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext); class UIResourceLostTest : public LayerTreeHostContextTest { public: UIResourceLostTest() : time_step_(0) {} - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->texture_id_allocation_chunk_size = 1; } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } - virtual void AfterTest() OVERRIDE {} + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } + virtual void AfterTest() override {} // This is called on the main thread after each commit and // DidActivateTreeOnThread, with the value of time_step_ at the time @@ -1225,7 +1225,7 @@ class UIResourceLostTestSimple : public UIResourceLostTest { // activated. virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) = 0; - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { if (!layer_tree_host()->settings().impl_side_painting) { StepCompleteOnImplThread(impl); PostStepCompleteToMainThread(); @@ -1233,7 +1233,7 @@ class UIResourceLostTestSimple : public UIResourceLostTest { } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { if (layer_tree_host()->settings().impl_side_painting) { StepCompleteOnImplThread(impl); PostStepCompleteToMainThread(); @@ -1245,7 +1245,7 @@ class UIResourceLostTestSimple : public UIResourceLostTest { // Losing context after an UI resource has been created. class UIResourceLostAfterCommit : public UIResourceLostTestSimple { public: - virtual void StepCompleteOnMainThread(int step) OVERRIDE { + virtual void StepCompleteOnMainThread(int step) override { EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread()); switch (step) { case 0: @@ -1265,7 +1265,7 @@ class UIResourceLostAfterCommit : public UIResourceLostTestSimple { } } - virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); switch (time_step_) { case 1: @@ -1304,7 +1304,7 @@ class UIResourceLostBeforeCommit : public UIResourceLostTestSimple { public: UIResourceLostBeforeCommit() : test_id0_(0), test_id1_(0) {} - virtual void StepCompleteOnMainThread(int step) OVERRIDE { + virtual void StepCompleteOnMainThread(int step) override { switch (step) { case 0: ui_resource_ = FakeScopedUIResource::Create(layer_tree_host()); @@ -1354,7 +1354,7 @@ class UIResourceLostBeforeCommit : public UIResourceLostTestSimple { } } - virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); switch (time_step_) { case 1: @@ -1400,7 +1400,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostBeforeCommit); // Losing UI resource before the pending trees is activated but after the // commit. Impl-side-painting only. class UIResourceLostBeforeActivateTree : public UIResourceLostTest { - virtual void StepCompleteOnMainThread(int step) OVERRIDE { + virtual void StepCompleteOnMainThread(int step) override { EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread()); switch (step) { case 0: @@ -1423,7 +1423,7 @@ class UIResourceLostBeforeActivateTree : public UIResourceLostTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); switch (time_step_) { case 2: @@ -1435,7 +1435,7 @@ class UIResourceLostBeforeActivateTree : public UIResourceLostTest { } } - virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override { switch (time_step_) { case 1: // The resource creation callback has been called. @@ -1452,7 +1452,7 @@ class UIResourceLostBeforeActivateTree : public UIResourceLostTest { } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::DidActivateTreeOnThread(impl); switch (time_step_) { case 1: @@ -1491,7 +1491,7 @@ TEST_F(UIResourceLostBeforeActivateTree, // Resources evicted explicitly and by visibility changes. class UIResourceLostEviction : public UIResourceLostTestSimple { public: - virtual void StepCompleteOnMainThread(int step) OVERRIDE { + virtual void StepCompleteOnMainThread(int step) override { EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread()); switch (step) { case 0: @@ -1514,7 +1514,7 @@ class UIResourceLostEviction : public UIResourceLostTestSimple { } virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* impl, - bool visible) OVERRIDE { + bool visible) override { TestWebGraphicsContext3D* context = TestContext(); if (!visible) { // All resources should have been evicted. @@ -1530,7 +1530,7 @@ class UIResourceLostEviction : public UIResourceLostTestSimple { } } - virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void StepCompleteOnImplThread(LayerTreeHostImpl* impl) override { TestWebGraphicsContext3D* context = TestContext(); LayerTreeHostContextTest::CommitCompleteOnThread(impl); switch (time_step_) { @@ -1578,7 +1578,7 @@ class LayerTreeHostContextTestSurfaceCreateCallback LayerTreeHostContextTestSurfaceCreateCallback() : LayerTreeHostContextTest() {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { if (layer_tree_host()->settings().impl_side_painting) { picture_layer_ = FakePictureLayer::Create(&client_); picture_layer_->SetBounds(gfx::Size(10, 20)); @@ -1592,9 +1592,9 @@ class LayerTreeHostContextTestSurfaceCreateCallback LayerTreeHostContextTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: if (layer_tree_host()->settings().impl_side_painting) @@ -1626,7 +1626,7 @@ class LayerTreeHostContextTestSurfaceCreateCallback } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { LayerTreeHostContextTest::CommitCompleteOnThread(impl); switch (LastCommittedSourceFrameNumber(impl)) { case 0: @@ -1642,7 +1642,7 @@ class LayerTreeHostContextTestSurfaceCreateCallback } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} protected: FakeContentLayerClient client_; @@ -1655,12 +1655,12 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame : public LayerTreeHostContextTest { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { deferred_ = false; PostSetNeedsCommitToMainThread(); } - virtual void ScheduledActionWillSendBeginMainFrame() OVERRIDE { + virtual void ScheduledActionWillSendBeginMainFrame() override { if (deferred_) return; deferred_ = true; @@ -1696,14 +1696,14 @@ class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame layer_tree_host()->SetDeferCommits(defer_commits); } - virtual void WillBeginMainFrame() OVERRIDE { + virtual void WillBeginMainFrame() override { // Don't begin a frame with a lost surface. EXPECT_FALSE(layer_tree_host()->output_surface_lost()); } - virtual void DidCommitAndDrawFrame() OVERRIDE { EndTest(); } + virtual void DidCommitAndDrawFrame() override { EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} bool deferred_; }; diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc index 6af1756..860f283 100644 --- a/cc/trees/layer_tree_host_unittest_copyrequest.cc +++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc @@ -21,7 +21,7 @@ class LayerTreeHostCopyRequestTest : public LayerTreeTest {}; class LayerTreeHostCopyRequestTestMultipleRequests : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root = FakeContentLayer::Create(&client_); root->SetBounds(gfx::Size(20, 20)); @@ -33,9 +33,9 @@ class LayerTreeHostCopyRequestTestMultipleRequests LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { WaitForCallback(); } + virtual void DidCommitAndDrawFrame() override { WaitForCallback(); } void WaitForCallback() { base::MessageLoop::current()->PostTask( @@ -101,10 +101,10 @@ class LayerTreeHostCopyRequestTestMultipleRequests callbacks_.push_back(result->size()); } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(4u, callbacks_.size()); } + virtual void AfterTest() override { EXPECT_EQ(4u, callbacks_.size()); } virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { if (use_gl_renderer_) return FakeOutputSurface::Create3d(); return FakeOutputSurface::CreateSoftware( @@ -146,7 +146,7 @@ TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, class LayerTreeHostCopyRequestTestLayerDestroyed : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -162,12 +162,12 @@ class LayerTreeHostCopyRequestTestLayerDestroyed LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { callback_count_ = 0; PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int frame = layer_tree_host()->source_frame_number(); switch (frame) { case 1: @@ -224,7 +224,7 @@ class LayerTreeHostCopyRequestTestLayerDestroyed ++callback_count_; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int callback_count_; FakeContentLayerClient client_; @@ -238,7 +238,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostCopyRequestTestLayerDestroyed); class LayerTreeHostCopyRequestTestInHiddenSubtree : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -267,7 +267,7 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree base::Unretained(this)))); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { callback_count_ = 0; PostSetNeedsCommitToMainThread(); @@ -321,7 +321,7 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int callback_count_; FakeContentLayerClient client_; @@ -337,7 +337,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -360,7 +360,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { did_draw_ = false; PostSetNeedsCommitToMainThread(); @@ -377,7 +377,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest EndTest(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { Renderer* renderer = host_impl->renderer(); LayerImpl* root = host_impl->active_tree()->root_layer(); @@ -398,7 +398,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest did_draw_ = true; } - virtual void AfterTest() OVERRIDE { EXPECT_TRUE(did_draw_); } + virtual void AfterTest() override { EXPECT_TRUE(did_draw_); } FakeContentLayerClient client_; bool did_draw_; @@ -415,7 +415,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( class LayerTreeHostCopyRequestTestClippedOut : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -433,7 +433,7 @@ class LayerTreeHostCopyRequestTestClippedOut LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); copy_layer_->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest( @@ -449,7 +449,7 @@ class LayerTreeHostCopyRequestTestClippedOut EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<FakeContentLayer> root_; @@ -463,7 +463,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -482,7 +482,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw base::Unretained(this)))); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { saw_copy_request_ = false; callback_count_ = 0; PostSetNeedsCommitToMainThread(); @@ -493,7 +493,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw AddCopyRequest(copy_layer_.get()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { if (impl->active_tree()->source_frame_number() == 0) { LayerImpl* root = impl->active_tree()->root_layer(); EXPECT_TRUE(root->children()[0]->HasCopyRequest()); @@ -501,7 +501,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw } } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (layer_tree_host()->source_frame_number() == 1) { // Allow drawing. layer_tree_host()->SetViewportSize(gfx::Size(root_->bounds())); @@ -519,7 +519,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw EndTest(); } - virtual void AfterTest() OVERRIDE { EXPECT_TRUE(saw_copy_request_); } + virtual void AfterTest() override { EXPECT_TRUE(saw_copy_request_); } bool saw_copy_request_; int callback_count_; @@ -535,7 +535,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface : public LayerTreeHostCopyRequestTest { protected: virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { if (!first_context_provider_.get()) { first_context_provider_ = TestContextProvider::Create(); return FakeOutputSurface::Create3d(first_context_provider_); @@ -546,7 +546,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface return FakeOutputSurface::Create3d(second_context_provider_); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -558,7 +558,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) { EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread()); @@ -573,7 +573,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface layer_tree_host()->SetNeedsCommit(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: // The layers have been pushed to the impl side. The layer textures have @@ -606,7 +606,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface } virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl, - bool result) OVERRIDE { + bool result) override { switch (impl->active_tree()->source_frame_number()) { case 0: // The layers have been drawn, so their textures have been allocated. @@ -646,7 +646,7 @@ class LayerTreeHostCopyRequestTestLostOutputSurface EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} scoped_refptr<TestContextProvider> first_context_provider_; scoped_refptr<TestContextProvider> second_context_provider_; @@ -665,12 +665,12 @@ class LayerTreeHostCopyRequestTestCountTextures : public LayerTreeHostCopyRequestTest { protected: virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) - OVERRIDE { + override { context_provider_ = TestContextProvider::Create(); return FakeOutputSurface::Create3d(context_provider_); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -682,7 +682,7 @@ class LayerTreeHostCopyRequestTestCountTextures LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { num_textures_without_readback_ = 0; num_textures_with_readback_ = 0; waited_sync_point_after_readback_ = 0; @@ -691,7 +691,7 @@ class LayerTreeHostCopyRequestTestCountTextures virtual void RequestCopy(Layer* layer) = 0; - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: // The layers have been pushed to the impl side. The layer textures have @@ -702,7 +702,7 @@ class LayerTreeHostCopyRequestTestCountTextures } virtual void SwapBuffersOnThread(LayerTreeHostImpl* impl, - bool result) OVERRIDE { + bool result) override { switch (impl->active_tree()->source_frame_number()) { case 0: // The layers have been drawn, so their textures have been allocated. @@ -738,7 +738,7 @@ class LayerTreeHostCopyRequestTestCountTextures class LayerTreeHostCopyRequestTestCreatesTexture : public LayerTreeHostCopyRequestTestCountTextures { protected: - virtual void RequestCopy(Layer* layer) OVERRIDE { + virtual void RequestCopy(Layer* layer) override { // Request a normal texture copy. This should create a new texture. copy_layer_->RequestCopyOfOutput( CopyOutputRequest::CreateRequest(base::Bind( @@ -758,7 +758,7 @@ class LayerTreeHostCopyRequestTestCreatesTexture release->Run(0, false); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // No sync point was needed. EXPECT_EQ(0u, waited_sync_point_after_readback_); // Except the copy to have made another texture. @@ -772,7 +772,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( class LayerTreeHostCopyRequestTestProvideTexture : public LayerTreeHostCopyRequestTestCountTextures { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { external_context_provider_ = TestContextProvider::Create(); EXPECT_TRUE(external_context_provider_->BindToCurrentThread()); LayerTreeHostCopyRequestTestCountTextures::BeginTest(); @@ -788,7 +788,7 @@ class LayerTreeHostCopyRequestTestProvideTexture EXPECT_FALSE(release); } - virtual void RequestCopy(Layer* layer) OVERRIDE { + virtual void RequestCopy(Layer* layer) override { // Request a copy to a provided texture. This should not create a new // texture. scoped_ptr<CopyOutputRequest> request = @@ -807,7 +807,7 @@ class LayerTreeHostCopyRequestTestProvideTexture copy_layer_->RequestCopyOfOutput(request.Pass()); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // Expect the compositor to have waited for the sync point in the provided // TextureMailbox. EXPECT_EQ(sync_point_, waited_sync_point_after_readback_); @@ -825,7 +825,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( class LayerTreeHostCopyRequestTestDestroyBeforeCopy : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -837,7 +837,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { callback_count_ = 0; PostSetNeedsCommitToMainThread(); } @@ -847,7 +847,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy ++callback_count_; } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { MainThreadTaskRunner()->PostTask( FROM_HERE, base::Bind(&LayerTreeHostCopyRequestTestDestroyBeforeCopy::DidActivate, @@ -888,7 +888,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int callback_count_; FakeContentLayerClient client_; @@ -902,7 +902,7 @@ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( class LayerTreeHostCopyRequestTestShutdownBeforeCopy : public LayerTreeHostCopyRequestTest { protected: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); root_->SetBounds(gfx::Size(20, 20)); @@ -914,7 +914,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy LayerTreeHostCopyRequestTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { callback_count_ = 0; PostSetNeedsCommitToMainThread(); } @@ -924,7 +924,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy ++callback_count_; } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { MainThreadTaskRunner()->PostTask( FROM_HERE, base::Bind(&LayerTreeHostCopyRequestTestShutdownBeforeCopy::DidActivate, @@ -959,7 +959,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy } } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, callback_count_); } + virtual void AfterTest() override { EXPECT_EQ(1, callback_count_); } int callback_count_; FakeContentLayerClient client_; diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc index 7d8535e..f8e44d5 100644 --- a/cc/trees/layer_tree_host_unittest_damage.cc +++ b/cc/trees/layer_tree_host_unittest_damage.cc @@ -26,7 +26,7 @@ class LayerTreeHostDamageTest : public LayerTreeTest {}; // LayerTreeHost::SetNeedsRedraw should damage the whole viewport. class LayerTreeHostDamageTestSetNeedsRedraw : public LayerTreeHostDamageTest { - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // Viewport is 10x10. scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_); root->SetBounds(gfx::Size(10, 10)); @@ -35,12 +35,12 @@ class LayerTreeHostDamageTestSetNeedsRedraw LayerTreeHostDamageTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { draw_count_ = 0; PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: layer_tree_host()->SetNeedsRedraw(); @@ -51,7 +51,7 @@ class LayerTreeHostDamageTestSetNeedsRedraw virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); RenderSurfaceImpl* root_surface = @@ -77,7 +77,7 @@ class LayerTreeHostDamageTestSetNeedsRedraw return draw_result; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int draw_count_; FakeContentLayerClient client_; @@ -88,7 +88,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestSetNeedsRedraw); // LayerTreeHost::SetViewportSize should damage the whole viewport. class LayerTreeHostDamageTestSetViewportSize : public LayerTreeHostDamageTest { - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // Viewport is 10x10. scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_); root->SetBounds(gfx::Size(10, 10)); @@ -97,12 +97,12 @@ class LayerTreeHostDamageTestSetViewportSize LayerTreeHostDamageTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { draw_count_ = 0; PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { switch (layer_tree_host()->source_frame_number()) { case 1: layer_tree_host()->SetViewportSize(gfx::Size(15, 15)); @@ -113,7 +113,7 @@ class LayerTreeHostDamageTestSetViewportSize virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); RenderSurfaceImpl* root_surface = @@ -139,7 +139,7 @@ class LayerTreeHostDamageTestSetViewportSize return draw_result; } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} int draw_count_; FakeContentLayerClient client_; @@ -149,14 +149,14 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDamageTestSetViewportSize); class LayerTreeHostDamageTestNoDamageDoesNotSwap : public LayerTreeHostDamageTest { - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { expect_swap_and_succeed_ = 0; did_swaps_ = 0; did_swap_and_succeed_ = 0; PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<FakeContentLayer> root = FakeContentLayer::Create(&client_); root->SetBounds(gfx::Size(10, 10)); @@ -172,7 +172,7 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); int source_frame = host_impl->active_tree()->source_frame_number(); @@ -198,14 +198,14 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ++did_swaps_; if (result) ++did_swap_and_succeed_; EXPECT_EQ(expect_swap_and_succeed_, did_swap_and_succeed_); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int next_frame = layer_tree_host()->source_frame_number(); switch (next_frame) { case 1: @@ -224,7 +224,7 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(4, did_swaps_); EXPECT_EQ(2, expect_swap_and_succeed_); EXPECT_EQ(expect_swap_and_succeed_, did_swap_and_succeed_); @@ -241,11 +241,11 @@ SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F( LayerTreeHostDamageTestNoDamageDoesNotSwap); class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = FakeContentLayer::Create(&client_); child_ = FakeContentLayer::Create(&client_); @@ -261,7 +261,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); RenderSurfaceImpl* root_surface = @@ -334,7 +334,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { return draw_result; } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { if (!TestEnded()) layer_tree_host()->SetNeedsCommit(); @@ -344,7 +344,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; scoped_refptr<FakeContentLayer> root_; @@ -355,7 +355,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostDamageTestForcedFullDamage); class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest { - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root_layer = Layer::Create(); root_layer->SetBounds(gfx::Size(400, 400)); root_layer->SetMasksToBounds(true); @@ -395,7 +395,7 @@ class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest { class LayerTreeHostDamageTestScrollbarDoesDamage : public LayerTreeHostScrollbarDamageTest { - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { did_swaps_ = 0; PostSetNeedsCommitToMainThread(); } @@ -403,7 +403,7 @@ class LayerTreeHostDamageTestScrollbarDoesDamage virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); RenderSurfaceImpl* root_surface = host_impl->active_tree()->root_layer()->render_surface(); @@ -432,7 +432,7 @@ class LayerTreeHostDamageTestScrollbarDoesDamage } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ++did_swaps_; EXPECT_TRUE(result); LayerImpl* root = host_impl->active_tree()->root_layer(); @@ -458,7 +458,7 @@ class LayerTreeHostDamageTestScrollbarDoesDamage } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(4, did_swaps_); } @@ -469,7 +469,7 @@ MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarDoesDamage); class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage : public LayerTreeHostScrollbarDamageTest { - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { did_swaps_ = 0; PostSetNeedsCommitToMainThread(); } @@ -477,7 +477,7 @@ class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); RenderSurfaceImpl* root_surface = host_impl->active_tree()->root_layer()->render_surface(); @@ -508,7 +508,7 @@ class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ++did_swaps_; EXPECT_TRUE(result); LayerImpl* root = host_impl->active_tree()->root_layer(); @@ -535,7 +535,7 @@ class LayerTreeHostDamageTestScrollbarCommitDoesNoDamage } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(3, did_swaps_); } @@ -547,15 +547,15 @@ MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); class LayerTreeHostDamageTestVisibleTilesStillTriggerDraws : public LayerTreeHostDamageTest { - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<FakePictureLayer> root = FakePictureLayer::Create(&client_); root->SetBounds(gfx::Size(500, 500)); layer_tree_host()->SetRootLayer(root); @@ -569,7 +569,7 @@ class LayerTreeHostDamageTestVisibleTilesStillTriggerDraws virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame_data, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); prepare_to_draw_count_++; switch (prepare_to_draw_count_) { @@ -600,7 +600,7 @@ class LayerTreeHostDamageTestVisibleTilesStillTriggerDraws } virtual void UpdateVisibleTilesOnThread( - LayerTreeHostImpl* host_impl) OVERRIDE { + LayerTreeHostImpl* host_impl) override { // Simulate creating some visible tiles (that trigger prepare-to-draws). // The first we make into a no-damage-frame during prepare-to-draw (see // above). This is to ensure we still get UpdateVisibleTiles calls after @@ -618,13 +618,13 @@ class LayerTreeHostDamageTestVisibleTilesStillTriggerDraws } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool didSwap) OVERRIDE { + bool didSwap) override { if (!didSwap) return; ++swap_count_; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { // We should keep getting update-visible-tiles calls // until we report there are no more incomplete-tiles. EXPECT_EQ(update_visible_tile_count_, 6); diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc index 247d94e..095513b 100644 --- a/cc/trees/layer_tree_host_unittest_delegated.cc +++ b/cc/trees/layer_tree_host_unittest_delegated.cc @@ -251,7 +251,7 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer resource_collection_->SetClient(this); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { root_ = Layer::Create(); root_->SetBounds(gfx::Size(15, 15)); @@ -259,7 +259,7 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer LayerTreeHostDelegatedTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { resource_collection_->SetClient(this); PostSetNeedsCommitToMainThread(); } @@ -296,10 +296,10 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer return delegated; } - virtual void AfterTest() OVERRIDE { resource_collection_->SetClient(NULL); } + virtual void AfterTest() override { resource_collection_->SetClient(NULL); } // DelegatedFrameProviderClient implementation. - virtual void UnusedResourcesAreAvailable() OVERRIDE { available_ = true; } + virtual void UnusedResourcesAreAvailable() override { available_ = true; } bool TestAndResetAvailable() { bool available = available_; @@ -323,13 +323,13 @@ class LayerTreeHostDelegatedTestCreateChildId num_activates_(0), did_reset_child_id_(false) {} - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (TestEnded()) return; SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1))); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() < 1) return; @@ -360,7 +360,7 @@ class LayerTreeHostDelegatedTestCreateChildId } virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, - bool success) OVERRIDE { + bool success) override { EXPECT_TRUE(success); if (num_activates_ < 2) @@ -391,7 +391,7 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost LayerTreeHostDelegatedTestInvalidFrameAfterContextLost() : num_activates_(0), num_output_surfaces_initialized_(0) {} - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { if (TestEnded()) return; scoped_ptr<DelegatedFrameData> frame1 = @@ -401,7 +401,7 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost SetFrameData(frame1.Pass()); } - virtual void DidInitializeOutputSurface() OVERRIDE { + virtual void DidInitializeOutputSurface() override { if (!num_output_surfaces_initialized_++) return; @@ -414,7 +414,7 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost DCHECK(delegated_.get() == old_delegated.get()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() < 1) return; @@ -435,7 +435,7 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost } virtual void InitializedRendererOnThread(LayerTreeHostImpl* host_impl, - bool success) OVERRIDE { + bool success) override { EXPECT_TRUE(success); if (num_activates_ < 2) @@ -450,7 +450,7 @@ class LayerTreeHostDelegatedTestInvalidFrameAfterContextLost EXPECT_EQ(0U, delegated_impl->Resources().size()); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { LayerTreeHostDelegatedTestCaseSingleDelegatedLayer::AfterTest(); EXPECT_EQ(2, num_output_surfaces_initialized_); } @@ -470,7 +470,7 @@ class LayerTreeHostDelegatedTestLayerUsesFrameDamage : LayerTreeHostDelegatedTestCaseSingleDelegatedLayer(), first_draw_for_source_frame_(true) {} - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { int next_source_frame_number = layer_tree_host()->source_frame_number(); switch (next_source_frame_number) { case 1: @@ -583,7 +583,7 @@ class LayerTreeHostDelegatedTestLayerUsesFrameDamage virtual DrawResult PrepareToDrawOnThread( LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { EXPECT_EQ(DRAW_SUCCESS, draw_result); if (!first_draw_for_source_frame_) @@ -674,7 +674,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestLayerUsesFrameDamage); class LayerTreeHostDelegatedTestMergeResources : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // Push two frames to the delegated renderer layer with no commit between. // The first frame has resource 999. @@ -707,7 +707,7 @@ class LayerTreeHostDelegatedTestMergeResources PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { LayerImpl* root_impl = host_impl->active_tree()->root_layer(); FakeDelegatedRendererLayerImpl* delegated_impl = static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]); @@ -734,7 +734,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestMergeResources); class LayerTreeHostDelegatedTestRemapResourcesInQuads : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // Generate a frame with two resources in it. scoped_ptr<DelegatedFrameData> frame = CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1)); @@ -747,7 +747,7 @@ class LayerTreeHostDelegatedTestRemapResourcesInQuads PostSetNeedsCommitToMainThread(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { LayerImpl* root_impl = host_impl->active_tree()->root_layer(); FakeDelegatedRendererLayerImpl* delegated_impl = static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]); @@ -783,11 +783,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestRemapResourcesInQuads); class LayerTreeHostDelegatedTestReturnUnusedResources : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -856,7 +856,7 @@ class LayerTreeHostDelegatedTestReturnUnusedResources } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -867,11 +867,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostDelegatedTestReusedResources : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -928,7 +928,7 @@ class LayerTreeHostDelegatedTestReusedResources } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -938,11 +938,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestReusedResources); class LayerTreeHostDelegatedTestFrameBeforeAck : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -997,7 +997,7 @@ class LayerTreeHostDelegatedTestFrameBeforeAck } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() != 3) return; @@ -1028,7 +1028,7 @@ class LayerTreeHostDelegatedTestFrameBeforeAck } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -1038,11 +1038,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestFrameBeforeAck); class LayerTreeHostDelegatedTestFrameBeforeTakeResources : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1109,7 +1109,7 @@ class LayerTreeHostDelegatedTestFrameBeforeTakeResources } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() != 3) return; @@ -1147,7 +1147,7 @@ class LayerTreeHostDelegatedTestFrameBeforeTakeResources } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -1158,11 +1158,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostDelegatedTestBadFrame : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1230,7 +1230,7 @@ class LayerTreeHostDelegatedTestBadFrame } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { if (host_impl->active_tree()->source_frame_number() < 1) return; @@ -1312,11 +1312,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestBadFrame); class LayerTreeHostDelegatedTestUnnamedResource : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1352,7 +1352,7 @@ class LayerTreeHostDelegatedTestUnnamedResource } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() != 1) return; @@ -1378,11 +1378,11 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestUnnamedResource); class LayerTreeHostDelegatedTestDontLeakResource : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1430,7 +1430,7 @@ class LayerTreeHostDelegatedTestDontLeakResource } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() != 1) return; @@ -1451,7 +1451,7 @@ class LayerTreeHostDelegatedTestDontLeakResource } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -1461,7 +1461,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestDontLeakResource); class LayerTreeHostDelegatedTestResourceSentToParent : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1516,7 +1516,7 @@ class LayerTreeHostDelegatedTestResourceSentToParent host_impl->ReclaimResources(&ack); } - virtual void UnusedResourcesAreAvailable() OVERRIDE { + virtual void UnusedResourcesAreAvailable() override { EXPECT_EQ(3, layer_tree_host()->source_frame_number()); ReturnedResourceArray resources; @@ -1531,7 +1531,7 @@ class LayerTreeHostDelegatedTestResourceSentToParent EndTest(); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() < 1) return; @@ -1592,13 +1592,13 @@ SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( class LayerTreeHostDelegatedTestCommitWithoutTake : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { // Prevent drawing with resources that are sent to the grandparent. layer_tree_host()->SetViewportSize(gfx::Size()); PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1664,7 +1664,7 @@ class LayerTreeHostDelegatedTestCommitWithoutTake } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { if (host_impl->active_tree()->source_frame_number() < 1) return; @@ -1714,7 +1714,7 @@ class DelegatedFrameIsActivatedDuringCommit protected: DelegatedFrameIsActivatedDuringCommit() : returned_resource_count_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { activate_count_ = 0; scoped_ptr<DelegatedFrameData> frame = @@ -1726,11 +1726,11 @@ class DelegatedFrameIsActivatedDuringCommit PostSetNeedsCommitToMainThread(); } - virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override { ++activate_count_; } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 1: { // The first frame has been activated. Set a new frame, and @@ -1757,7 +1757,7 @@ class DelegatedFrameIsActivatedDuringCommit } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { switch (host_impl->active_tree()->source_frame_number()) { case 0: { // The activate for the 1st frame should have happened before now. @@ -1782,11 +1782,11 @@ class DelegatedFrameIsActivatedDuringCommit } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } - virtual void UnusedResourcesAreAvailable() OVERRIDE { + virtual void UnusedResourcesAreAvailable() override { LayerTreeHostDelegatedTestCaseSingleDelegatedLayer:: UnusedResourcesAreAvailable(); ReturnedResourceArray resources; @@ -1807,9 +1807,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostDelegatedTestTwoImplLayers : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1857,7 +1857,7 @@ class LayerTreeHostDelegatedTestTwoImplLayers } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -1867,9 +1867,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestTwoImplLayers); class LayerTreeHostDelegatedTestTwoImplLayersTwoFrames : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -1926,7 +1926,7 @@ class LayerTreeHostDelegatedTestTwoImplLayersTwoFrames } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } }; @@ -1937,9 +1937,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostDelegatedTestTwoLayers : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -2013,7 +2013,7 @@ class LayerTreeHostDelegatedTestTwoLayers } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } @@ -2025,9 +2025,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestTwoLayers); class LayerTreeHostDelegatedTestRemoveAndAddToTree : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -2105,7 +2105,7 @@ class LayerTreeHostDelegatedTestRemoveAndAddToTree } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } @@ -2117,9 +2117,9 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestRemoveAndAddToTree); class LayerTreeHostDelegatedTestRemoveAndChangeResources : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { public: - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void DidCommitAndDrawFrame() override { scoped_ptr<DelegatedFrameData> frame; ReturnedResourceArray resources; @@ -2187,7 +2187,7 @@ class LayerTreeHostDelegatedTestRemoveAndChangeResources } virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, - bool result) OVERRIDE { + bool result) override { ReturnUnusedResourcesFromParent(host_impl); } diff --git a/cc/trees/layer_tree_host_unittest_no_message_loop.cc b/cc/trees/layer_tree_host_unittest_no_message_loop.cc index a48156b..fb0e2be 100644 --- a/cc/trees/layer_tree_host_unittest_no_message_loop.cc +++ b/cc/trees/layer_tree_host_unittest_no_message_loop.cc @@ -31,7 +31,7 @@ class NoMessageLoopOutputSurface : public OutputSurface { virtual ~NoMessageLoopOutputSurface() {} // OutputSurface overrides. - virtual void SwapBuffers(CompositorFrame* frame) OVERRIDE { + virtual void SwapBuffers(CompositorFrame* frame) override { DCHECK(client_); client_->DidSwapBuffers(); client_->DidSwapBuffersComplete(); @@ -53,34 +53,34 @@ class LayerTreeHostNoMessageLoopTest virtual ~LayerTreeHostNoMessageLoopTest() {} // LayerTreeHostClient overrides. - virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} - virtual void BeginMainFrame(const BeginFrameArgs& args) OVERRIDE {} - virtual void DidBeginMainFrame() OVERRIDE {} - virtual void Layout() OVERRIDE {} + virtual void WillBeginMainFrame(int frame_id) override {} + virtual void BeginMainFrame(const BeginFrameArgs& args) override {} + virtual void DidBeginMainFrame() override {} + virtual void Layout() override {} virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, float page_scale, - float top_controls_delta) OVERRIDE {} + float top_controls_delta) override {} virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float page_scale, - float top_controls_delta) OVERRIDE {} - virtual void RequestNewOutputSurface(bool fallback) OVERRIDE { + float top_controls_delta) override {} + virtual void RequestNewOutputSurface(bool fallback) override { layer_tree_host_->SetOutputSurface( make_scoped_ptr<OutputSurface>(new NoMessageLoopOutputSurface)); } - virtual void DidInitializeOutputSurface() OVERRIDE { + virtual void DidInitializeOutputSurface() override { did_initialize_output_surface_ = true; } - virtual void WillCommit() OVERRIDE {} - virtual void DidCommit() OVERRIDE { did_commit_ = true; } - virtual void DidCommitAndDrawFrame() OVERRIDE { + virtual void WillCommit() override {} + virtual void DidCommit() override { did_commit_ = true; } + virtual void DidCommitAndDrawFrame() override { did_commit_and_draw_frame_ = true; } - virtual void DidCompleteSwapBuffers() OVERRIDE {} + virtual void DidCompleteSwapBuffers() override {} // LayerTreeHostSingleThreadClient overrides. - virtual void DidPostSwapBuffers() OVERRIDE {} - virtual void DidAbortSwapBuffers() OVERRIDE {} + virtual void DidPostSwapBuffers() override {} + virtual void DidAbortSwapBuffers() override {} void RunTest() { no_loop_thread_.Start(); @@ -88,7 +88,7 @@ class LayerTreeHostNoMessageLoopTest } // base::DelegateSimpleThread::Delegate override. - virtual void Run() OVERRIDE { + virtual void Run() override { ASSERT_FALSE(base::MessageLoopProxy::current().get()); RunTestWithoutMessageLoop(); EXPECT_FALSE(base::MessageLoopProxy::current().get()); @@ -137,7 +137,7 @@ class LayerTreeHostNoMessageLoopTest class LayerTreeHostNoMessageLoopSmokeTest : public LayerTreeHostNoMessageLoopTest { protected: - virtual void RunTestWithoutMessageLoop() OVERRIDE { + virtual void RunTestWithoutMessageLoop() override { gfx::Size size(100, 100); // Set up root layer. @@ -164,7 +164,7 @@ class LayerTreeHostNoMessageLoopDelegatedLayer : public LayerTreeHostNoMessageLoopTest, public DelegatedFrameResourceCollectionClient { protected: - virtual void RunTestWithoutMessageLoop() OVERRIDE { + virtual void RunTestWithoutMessageLoop() override { resource_collection_ = new DelegatedFrameResourceCollection; frame_provider_ = new DelegatedFrameProvider( resource_collection_.get(), CreateFrameDataWithResource(998)); @@ -198,7 +198,7 @@ class LayerTreeHostNoMessageLoopDelegatedLayer } // DelegatedFrameResourceCollectionClient overrides. - virtual void UnusedResourcesAreAvailable() OVERRIDE {} + virtual void UnusedResourcesAreAvailable() override {} private: scoped_ptr<DelegatedFrameData> CreateFrameDataWithResource( diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc index 3a572d3..943299d 100644 --- a/cc/trees/layer_tree_host_unittest_occlusion.cc +++ b/cc/trees/layer_tree_host_unittest_occlusion.cc @@ -20,7 +20,7 @@ class TestLayer : public Layer { } virtual bool Update(ResourceUpdateQueue* update_queue, - const OcclusionTracker<Layer>* occlusion) OVERRIDE { + const OcclusionTracker<Layer>* occlusion) override { if (!occlusion) return false; @@ -60,18 +60,18 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest { mask_(TestLayer::Create()) { } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { TestLayer* root = static_cast<TestLayer*>(layer_tree_host()->root_layer()); VerifyOcclusion(root); EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} void VerifyOcclusion(TestLayer* layer) const { EXPECT_EQ(layer->expected_occlusion().ToString(), @@ -99,7 +99,7 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest { } protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->minimum_occlusion_tracking_size = gfx::Size(); } @@ -116,7 +116,7 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest { class LayerTreeHostOcclusionTestOcclusionSurfaceClipping : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // The child layer is a surface and the grand_child is opaque, but clipped // to the child and root SetLayerPropertiesForTesting( @@ -146,7 +146,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionSurfaceClippingOpaque : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer is opaque, then it adds to the occlusion seen by the // root_. SetLayerPropertiesForTesting( @@ -176,7 +176,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionTwoChildren : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // Add a second child to the root layer and the regions should merge SetLayerPropertiesForTesting( root_.get(), NULL, identity_matrix_, @@ -209,7 +209,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionMask : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer has a mask on it, then it shouldn't contribute to // occlusion on stuff below it. SetLayerPropertiesForTesting( @@ -242,7 +242,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionMask); class LayerTreeHostOcclusionTestOcclusionMaskBelowOcclusion : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer with a mask is below child2, then child2 should // contribute to occlusion on everything, and child shouldn't contribute // to the root_. @@ -278,7 +278,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionOpacity : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer has a non-opaque opacity, then it shouldn't // contribute to occlusion on stuff below it SetLayerPropertiesForTesting( @@ -311,7 +311,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionOpacity); class LayerTreeHostOcclusionTestOcclusionOpacityBelowOcclusion : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer with non-opaque opacity is below child2, then // child2 should contribute to occlusion on everything, and child shouldn't // contribute to the root_. @@ -347,7 +347,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionBlending : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer has a blend mode, then it shouldn't // contribute to occlusion on stuff below it SetLayerPropertiesForTesting( @@ -380,7 +380,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionBlending); class LayerTreeHostOcclusionTestOcclusionBlendingBelowOcclusion : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer with a blend mode is below child2, then // child2 should contribute to occlusion on everything, and child shouldn't // contribute to the root_. @@ -415,7 +415,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionOpacityFilter : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { FilterOperations filters; filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); @@ -467,7 +467,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F( class LayerTreeHostOcclusionTestOcclusionBlurFilter : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { gfx::Transform child_transform; child_transform.Translate(250.0, 250.0); child_transform.Rotate(90.0); @@ -511,7 +511,7 @@ class LayerTreeHostOcclusionTestOcclusionCopyRequest public: static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer has copy request, and is below child2, // then child should not inherit occlusion from outside its subtree. // The child layer will still receive occlusion from inside, and @@ -546,7 +546,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionCopyRequest); class LayerTreeHostOcclusionTestOcclusionReplica : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // If the child layer has copy request, and is below child2, // then child should not inherit occlusion from outside its subtree. // The child layer will still receive occlusion from inside, and @@ -581,7 +581,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionReplica); class LayerTreeHostOcclusionTestManySurfaces : public LayerTreeHostOcclusionTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { // We create enough RenderSurfaces that it will trigger Vector reallocation // while computing occlusion. std::vector<scoped_refptr<TestLayer> > layers; diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc index 731f6921..a79d075 100644 --- a/cc/trees/layer_tree_host_unittest_picture.cc +++ b/cc/trees/layer_tree_host_unittest_picture.cc @@ -16,7 +16,7 @@ namespace { // These tests deal with picture layers. class LayerTreeHostPictureTest : public LayerTreeTest { protected: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { // PictureLayer can only be used with impl side painting enabled. settings->impl_side_painting = true; } @@ -24,7 +24,7 @@ class LayerTreeHostPictureTest : public LayerTreeTest { class LayerTreeHostPictureTestTwinLayer : public LayerTreeHostPictureTest { - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostPictureTest::SetupTree(); scoped_refptr<FakePictureLayer> picture = @@ -32,12 +32,12 @@ class LayerTreeHostPictureTestTwinLayer layer_tree_host()->root_layer()->AddChild(picture); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { activates_ = 0; PostSetNeedsCommitToMainThread(); } - virtual void DidCommit() OVERRIDE { + virtual void DidCommit() override { switch (layer_tree_host()->source_frame_number()) { case 2: // Drop the picture layer from the tree. @@ -52,7 +52,7 @@ class LayerTreeHostPictureTestTwinLayer } } - virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override { LayerImpl* pending_root_impl = impl->pending_tree()->root_layer(); LayerImpl* active_root_impl = impl->active_tree()->root_layer(); @@ -88,7 +88,7 @@ class LayerTreeHostPictureTestTwinLayer EXPECT_EQ(active_picture_impl, pending_picture_impl->twin_layer()); } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { LayerImpl* active_root_impl = impl->active_tree()->root_layer(); if (active_root_impl->children().empty()) { @@ -107,7 +107,7 @@ class LayerTreeHostPictureTestTwinLayer EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} FakeContentLayerClient client_; int activates_; diff --git a/cc/trees/layer_tree_host_unittest_proxy.cc b/cc/trees/layer_tree_host_unittest_proxy.cc index 4f79311..5993479 100644 --- a/cc/trees/layer_tree_host_unittest_proxy.cc +++ b/cc/trees/layer_tree_host_unittest_proxy.cc @@ -37,8 +37,8 @@ class ProxyTest : public LayerTreeTest { RunTest(threaded, delegating_renderer, impl_side_painting); } - virtual void BeginTest() OVERRIDE {} - virtual void AfterTest() OVERRIDE {} + virtual void BeginTest() override {} + virtual void AfterTest() override {} private: DISALLOW_COPY_AND_ASSIGN(ProxyTest); @@ -46,28 +46,28 @@ class ProxyTest : public LayerTreeTest { class ProxyTestScheduledActionsBasic : public ProxyTest { protected: - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { proxy()->SetNeedsCommit(); } - virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE { + virtual void ScheduledActionBeginOutputSurfaceCreation() override { EXPECT_EQ(0, action_phase_++); } - virtual void ScheduledActionSendBeginMainFrame() OVERRIDE { + virtual void ScheduledActionSendBeginMainFrame() override { EXPECT_EQ(1, action_phase_++); } - virtual void ScheduledActionCommit() OVERRIDE { + virtual void ScheduledActionCommit() override { EXPECT_EQ(2, action_phase_++); } - virtual void ScheduledActionDrawAndSwapIfPossible() OVERRIDE { + virtual void ScheduledActionDrawAndSwapIfPossible() override { EXPECT_EQ(3, action_phase_++); EndTest(); } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(4, action_phase_); } @@ -109,7 +109,7 @@ class ThreadProxyTestSetNeedsCommit : public ThreadProxyTest { ThreadProxyTestSetNeedsCommit() {} virtual ~ThreadProxyTestSetNeedsCommit() {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { EXPECT_FALSE(ThreadProxyMainOnly().commit_requested); EXPECT_FALSE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread); @@ -119,7 +119,7 @@ class ThreadProxyTestSetNeedsCommit : public ThreadProxyTest { EXPECT_TRUE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread); } - virtual void DidBeginMainFrame() OVERRIDE { + virtual void DidBeginMainFrame() override { EXPECT_FALSE(ThreadProxyMainOnly().commit_requested); EXPECT_FALSE(ThreadProxyMainOnly().commit_request_sent_to_impl_thread); diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc index 4f18d00..82cee89 100644 --- a/cc/trees/layer_tree_host_unittest_scroll.cc +++ b/cc/trees/layer_tree_host_unittest_scroll.cc @@ -33,7 +33,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { scroll_amount_(2, -1), num_scrolls_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { Layer* root_layer = layer_tree_host()->root_layer(); scoped_refptr<Layer> scroll_layer = Layer::Create(); root_layer->AddChild(scroll_layer); @@ -48,7 +48,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { PostSetNeedsCommitToMainThread(); } - virtual void Layout() OVERRIDE { + virtual void Layout() override { Layer* root = layer_tree_host()->root_layer(); Layer* scroll_layer = root->children()[0].get(); if (!layer_tree_host()->source_frame_number()) { @@ -63,7 +63,7 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root = impl->active_tree()->root_layer(); LayerImpl* scroll_layer = root->children()[0]; EXPECT_VECTOR_EQ(gfx::Vector2d(), scroll_layer->ScrollDelta()); @@ -89,11 +89,11 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float top_controls_delta) OVERRIDE { + float top_controls_delta) override { num_scrolls_++; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); } + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } private: gfx::ScrollOffset initial_scroll_; @@ -110,7 +110,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw LayerTreeHostScrollTestScrollMultipleRedraw() : initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {} - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { Layer* root_layer = layer_tree_host()->root_layer(); scroll_layer_ = Layer::Create(); root_layer->AddChild(scroll_layer_); @@ -125,7 +125,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw PostSetNeedsCommitToMainThread(); } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { switch (layer_tree_host()->source_frame_number()) { case 0: EXPECT_VECTOR_EQ(scroll_layer_->scroll_offset(), initial_scroll_); @@ -144,7 +144,7 @@ class LayerTreeHostScrollTestScrollMultipleRedraw } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* scroll_layer = impl->active_tree()->LayerById(scroll_layer_->id()); if (impl->active_tree()->source_frame_number() == 0 && @@ -180,11 +180,11 @@ class LayerTreeHostScrollTestScrollMultipleRedraw virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float top_controls_delta) OVERRIDE { + float top_controls_delta) override { num_scrolls_++; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); } + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } private: gfx::ScrollOffset initial_scroll_; @@ -210,9 +210,9 @@ class LayerTreeHostScrollTestScrollAbortedCommit num_impl_commits_(0), num_impl_scrolls_(0) {} - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostScrollTest::SetupTree(); Layer* root_layer = layer_tree_host()->root_layer(); scoped_refptr<Layer> root_scroll_layer = Layer::Create(); @@ -228,7 +228,7 @@ class LayerTreeHostScrollTestScrollAbortedCommit layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f); } - virtual void WillBeginMainFrame() OVERRIDE { + virtual void WillBeginMainFrame() override { num_will_begin_main_frames_++; Layer* root_scroll_layer = layer_tree_host()->root_layer()->children()[0].get(); @@ -280,17 +280,17 @@ class LayerTreeHostScrollTestScrollAbortedCommit } } - virtual void DidBeginMainFrame() OVERRIDE { num_did_begin_main_frames_++; } + virtual void DidBeginMainFrame() override { num_did_begin_main_frames_++; } - virtual void WillCommit() OVERRIDE { num_will_commits_++; } + virtual void WillCommit() override { num_will_commits_++; } - virtual void DidCommit() OVERRIDE { num_did_commits_++; } + virtual void DidCommit() override { num_did_commits_++; } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { num_impl_commits_++; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root_scroll_layer = impl->active_tree()->root_layer()->children()[0]; @@ -360,11 +360,11 @@ class LayerTreeHostScrollTestScrollAbortedCommit virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float top_controls_delta) OVERRIDE { + float top_controls_delta) override { num_impl_scrolls_++; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(3, num_impl_scrolls_); // Verify that the embedder sees aborted commits as real commits. EXPECT_EQ(4, num_will_begin_main_frames_); @@ -394,7 +394,7 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest { public: LayerTreeHostScrollTestFractionalScroll() : scroll_amount_(1.75, 0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostScrollTest::SetupTree(); Layer* root_layer = layer_tree_host()->root_layer(); scoped_refptr<Layer> root_scroll_layer = Layer::Create(); @@ -411,11 +411,11 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest { layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root = impl->active_tree()->root_layer(); LayerImpl* scroll_layer = root->children()[0]; @@ -447,7 +447,7 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest { scroll_layer->ScrollBy(scroll_amount_); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: gfx::Vector2dF scroll_amount_; @@ -463,7 +463,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest { scroll_amount_(2, -1), num_scrolls_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_); scoped_refptr<Layer> root_layer = Layer::Create(); @@ -516,9 +516,9 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest { LayerTreeHostScrollTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void WillCommit() OVERRIDE { + virtual void WillCommit() override { // Keep the test committing (otherwise the early out for no update // will stall the test). if (layer_tree_host()->source_frame_number() < 2) { @@ -532,11 +532,11 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest { virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float top_controls_delta) OVERRIDE { + float top_controls_delta) override { num_scrolls_++; } - virtual void Layout() OVERRIDE { + virtual void Layout() override { EXPECT_VECTOR_EQ(gfx::Vector2d(), expected_no_scroll_layer_->scroll_offset()); @@ -561,7 +561,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest { } } - virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root_impl = impl->active_tree()->root_layer(); FakePictureLayerImpl* root_scroll_layer_impl = static_cast<FakePictureLayerImpl*>(root_impl->children()[0]); @@ -632,7 +632,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest { } } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { if (scroll_child_layer_) { EXPECT_EQ(0, num_scrolls_); EXPECT_VECTOR_EQ(gfx::ScrollOffsetWithDelta(javascript_scroll_, @@ -748,11 +748,11 @@ TEST_F(LayerTreeHostScrollTestCaseWithChild, class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest { public: - virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { + virtual void InitializeSettings(LayerTreeSettings* settings) override { settings->impl_side_painting = true; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { if (impl->pending_tree()) impl->SetNeedsRedraw(); } @@ -767,7 +767,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { impl_thread_scroll2_(-3, 10), num_scrolls_(0) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostScrollTest::SetupTree(); Layer* root_layer = layer_tree_host()->root_layer(); scoped_refptr<Layer> root_scroll_layer = Layer::Create(); @@ -785,11 +785,11 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void Layout() OVERRIDE { + virtual void Layout() override { Layer* root = layer_tree_host()->root_layer(); Layer* scroll_layer = root->children()[0].get(); if (!layer_tree_host()->source_frame_number()) { @@ -807,14 +807,14 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { // We force a second draw here of the first commit before activating // the second commit. if (impl->active_tree()->source_frame_number() == 0) impl->SetNeedsRedraw(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { ImplSidePaintingScrollTest::DrawLayersOnThread(impl); LayerImpl* root = impl->active_tree()->root_layer(); @@ -874,11 +874,11 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, - float top_controls_delta) OVERRIDE { + float top_controls_delta) override { num_scrolls_++; } - virtual void AfterTest() OVERRIDE { EXPECT_EQ(1, num_scrolls_); } + virtual void AfterTest() override { EXPECT_EQ(1, num_scrolls_); } private: gfx::ScrollOffset initial_scroll_; @@ -900,7 +900,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll ImplSidePaintingScrollTestImplOnlyScroll() : initial_scroll_(20, 10), impl_thread_scroll_(-2, 3) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeHostScrollTest::SetupTree(); Layer* root_layer = layer_tree_host()->root_layer(); scoped_refptr<Layer> root_scroll_layer = Layer::Create(); @@ -918,11 +918,11 @@ class ImplSidePaintingScrollTestImplOnlyScroll layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.01f, 100.f); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void WillCommit() OVERRIDE { + virtual void WillCommit() override { Layer* root = layer_tree_host()->root_layer(); Layer* scroll_layer = root->children()[0].get(); switch (layer_tree_host()->source_frame_number()) { @@ -938,7 +938,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll } } - virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) override { // Scroll after the 2nd commit has started. if (impl->active_tree()->source_frame_number() == 0) { LayerImpl* active_root = impl->active_tree()->root_layer(); @@ -949,7 +949,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll } } - virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { // We force a second draw here of the first commit before activating // the second commit. LayerImpl* active_root = impl->active_tree()->root_layer(); @@ -998,7 +998,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll } } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { ImplSidePaintingScrollTest::DrawLayersOnThread(impl); LayerImpl* root = impl->active_tree()->root_layer(); @@ -1020,7 +1020,7 @@ class ImplSidePaintingScrollTestImplOnlyScroll } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} private: gfx::ScrollOffset initial_scroll_; @@ -1034,15 +1034,15 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset public: LayerTreeHostScrollTestScrollZeroMaxScrollOffset() {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { LayerTreeTest::SetupTree(); scoped_refptr<Layer> scroll_layer = Layer::Create(); layer_tree_host()->root_layer()->AddChild(scroll_layer); } - virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root = impl->active_tree()->root_layer(); LayerImpl* scroll_layer = root->children()[0]; scroll_layer->SetScrollClipLayer(root->id()); @@ -1069,7 +1069,7 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset EndTest(); } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} }; SINGLE_AND_MULTI_THREAD_TEST_F( @@ -1081,17 +1081,17 @@ class ThreadCheckingInputHandlerClient : public InputHandlerClient { bool* received_stop_flinging) : task_runner_(runner), received_stop_flinging_(received_stop_flinging) {} - virtual void WillShutdown() OVERRIDE { + virtual void WillShutdown() override { if (!received_stop_flinging_) ADD_FAILURE() << "WillShutdown() called before fling stopped"; } - virtual void Animate(base::TimeTicks time) OVERRIDE { + virtual void Animate(base::TimeTicks time) override { if (!task_runner_->BelongsToCurrentThread()) ADD_FAILURE() << "Animate called on wrong thread"; } - virtual void MainThreadHasStoppedFlinging() OVERRIDE { + virtual void MainThreadHasStoppedFlinging() override { if (!task_runner_->BelongsToCurrentThread()) ADD_FAILURE() << "MainThreadHasStoppedFlinging called on wrong thread"; *received_stop_flinging_ = true; @@ -1100,7 +1100,7 @@ class ThreadCheckingInputHandlerClient : public InputHandlerClient { virtual void DidOverscroll( const gfx::PointF& causal_event_viewport_point, const gfx::Vector2dF& accumulated_overscroll, - const gfx::Vector2dF& latest_overscroll_delta) OVERRIDE { + const gfx::Vector2dF& latest_overscroll_delta) override { if (!task_runner_->BelongsToCurrentThread()) ADD_FAILURE() << "DidOverscroll called on wrong thread"; } @@ -1155,7 +1155,7 @@ class LayerTreeHostScrollTestLayerStructureChange LayerTreeHostScrollTestLayerStructureChange() : scroll_destroy_whole_tree_(false) {} - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root_layer = Layer::Create(); root_layer->SetBounds(gfx::Size(10, 10)); @@ -1168,11 +1168,11 @@ class LayerTreeHostScrollTestLayerStructureChange LayerTreeHostScrollTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { PostSetNeedsCommitToMainThread(); } - virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) override { LayerImpl* root = impl->active_tree()->root_layer(); switch (impl->active_tree()->source_frame_number()) { case 0: @@ -1187,7 +1187,7 @@ class LayerTreeHostScrollTestLayerStructureChange } } - virtual void AfterTest() OVERRIDE {} + virtual void AfterTest() override {} virtual void DidScroll(Layer* layer) { if (scroll_destroy_whole_tree_) { diff --git a/cc/trees/layer_tree_host_unittest_video.cc b/cc/trees/layer_tree_host_unittest_video.cc index 7d0bb41..8d8b130 100644 --- a/cc/trees/layer_tree_host_unittest_video.cc +++ b/cc/trees/layer_tree_host_unittest_video.cc @@ -22,7 +22,7 @@ class LayerTreeHostVideoTest : public LayerTreeTest {}; class LayerTreeHostVideoTestSetNeedsDisplay : public LayerTreeHostVideoTest { public: - virtual void SetupTree() OVERRIDE { + virtual void SetupTree() override { scoped_refptr<Layer> root = Layer::Create(); root->SetBounds(gfx::Size(10, 10)); root->SetIsDrawable(true); @@ -39,14 +39,14 @@ class LayerTreeHostVideoTestSetNeedsDisplay LayerTreeHostVideoTest::SetupTree(); } - virtual void BeginTest() OVERRIDE { + virtual void BeginTest() override { num_draws_ = 0; PostSetNeedsCommitToMainThread(); } virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, LayerTreeHostImpl::FrameData* frame, - DrawResult draw_result) OVERRIDE { + DrawResult draw_result) override { LayerImpl* root_layer = host_impl->active_tree()->root_layer(); RenderSurfaceImpl* root_surface = root_layer->render_surface(); gfx::RectF damage_rect = @@ -70,7 +70,7 @@ class LayerTreeHostVideoTestSetNeedsDisplay return draw_result; } - virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { VideoLayerImpl* video = static_cast<VideoLayerImpl*>( host_impl->active_tree()->root_layer()->children()[0]); @@ -82,7 +82,7 @@ class LayerTreeHostVideoTestSetNeedsDisplay ++num_draws_; } - virtual void AfterTest() OVERRIDE { + virtual void AfterTest() override { EXPECT_EQ(2, num_draws_); } diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc index 948c2ba..161b361 100644 --- a/cc/trees/layer_tree_impl.cc +++ b/cc/trees/layer_tree_impl.cc @@ -50,16 +50,16 @@ class LayerScrollOffsetDelegateProxy : public LayerImpl::ScrollOffsetDelegate { // LayerScrollOffsetDelegate implementation. virtual void SetTotalScrollOffset( - const gfx::ScrollOffset& new_offset) OVERRIDE { + const gfx::ScrollOffset& new_offset) override { last_set_scroll_offset_ = new_offset; layer_tree_impl_->UpdateScrollOffsetDelegate(); } - virtual gfx::ScrollOffset GetTotalScrollOffset() OVERRIDE { + virtual gfx::ScrollOffset GetTotalScrollOffset() override { return layer_tree_impl_->GetDelegatedScrollOffset(layer_); } - virtual bool IsExternalFlingActive() const OVERRIDE { + virtual bool IsExternalFlingActive() const override { return delegate_->IsExternalFlingActive(); } diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc index 3c6c440..6ab3397 100644 --- a/cc/trees/occlusion_tracker_unittest.cc +++ b/cc/trees/occlusion_tracker_unittest.cc @@ -33,7 +33,7 @@ class TestContentLayer : public Layer { SetIsDrawable(true); } - virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const OVERRIDE { + virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override { if (override_opaque_contents_rect_) { return SimpleEnclosedRegion( gfx::IntersectRects(opaque_contents_rect_, visible_content_rect())); @@ -59,7 +59,7 @@ class TestContentLayerImpl : public LayerImpl { SetDrawsContent(true); } - virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const OVERRIDE { + virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const override { if (override_opaque_contents_rect_) { return SimpleEnclosedRegion( gfx::IntersectRects(opaque_contents_rect_, visible_content_rect())); diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h index 17aec8e..21b9f88 100644 --- a/cc/trees/single_thread_proxy.h +++ b/cc/trees/single_thread_proxy.h @@ -32,79 +32,79 @@ class CC_EXPORT SingleThreadProxy : public Proxy, virtual ~SingleThreadProxy(); // Proxy implementation - virtual void FinishAllRendering() OVERRIDE; - virtual bool IsStarted() const OVERRIDE; - virtual void SetOutputSurface(scoped_ptr<OutputSurface>) OVERRIDE; - virtual void SetLayerTreeHostClientReady() OVERRIDE; - virtual void SetVisible(bool visible) OVERRIDE; - virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; - virtual void SetNeedsAnimate() OVERRIDE; - virtual void SetNeedsUpdateLayers() OVERRIDE; - virtual void SetNeedsCommit() OVERRIDE; - virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; - virtual void SetNextCommitWaitsForActivation() OVERRIDE; - virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} - virtual void SetDeferCommits(bool defer_commits) OVERRIDE; - virtual bool CommitRequested() const OVERRIDE; - virtual bool BeginMainFrameRequested() const OVERRIDE; - virtual void MainThreadHasStoppedFlinging() OVERRIDE {} - virtual void Start() OVERRIDE; - virtual void Stop() OVERRIDE; - virtual size_t MaxPartialTextureUpdates() const OVERRIDE; - virtual void ForceSerializeOnSwapBuffers() OVERRIDE; - virtual bool SupportsImplScrolling() const OVERRIDE; - virtual void AsValueInto(base::debug::TracedValue* state) const OVERRIDE; - virtual bool MainFrameWillHappenForTesting() OVERRIDE; + virtual void FinishAllRendering() override; + virtual bool IsStarted() const override; + virtual void SetOutputSurface(scoped_ptr<OutputSurface>) override; + virtual void SetLayerTreeHostClientReady() override; + virtual void SetVisible(bool visible) override; + virtual const RendererCapabilities& GetRendererCapabilities() const override; + virtual void SetNeedsAnimate() override; + virtual void SetNeedsUpdateLayers() override; + virtual void SetNeedsCommit() override; + virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) override; + virtual void SetNextCommitWaitsForActivation() override; + virtual void NotifyInputThrottledUntilCommit() override {} + virtual void SetDeferCommits(bool defer_commits) override; + virtual bool CommitRequested() const override; + virtual bool BeginMainFrameRequested() const override; + virtual void MainThreadHasStoppedFlinging() override {} + virtual void Start() override; + virtual void Stop() override; + virtual size_t MaxPartialTextureUpdates() const override; + virtual void ForceSerializeOnSwapBuffers() override; + virtual bool SupportsImplScrolling() const override; + virtual void AsValueInto(base::debug::TracedValue* state) const override; + virtual bool MainFrameWillHappenForTesting() override; // SchedulerClient implementation - virtual BeginFrameSource* ExternalBeginFrameSource() OVERRIDE; - virtual void WillBeginImplFrame(const BeginFrameArgs& args) OVERRIDE; - virtual void ScheduledActionSendBeginMainFrame() OVERRIDE; - virtual DrawResult ScheduledActionDrawAndSwapIfPossible() OVERRIDE; - virtual DrawResult ScheduledActionDrawAndSwapForced() OVERRIDE; - virtual void ScheduledActionCommit() OVERRIDE; - virtual void ScheduledActionAnimate() OVERRIDE; - virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; - virtual void ScheduledActionActivateSyncTree() OVERRIDE; - virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; - virtual void ScheduledActionManageTiles() OVERRIDE; - virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; - virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; - virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; - virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; - virtual void DidBeginImplFrameDeadline() OVERRIDE; + virtual BeginFrameSource* ExternalBeginFrameSource() override; + virtual void WillBeginImplFrame(const BeginFrameArgs& args) override; + virtual void ScheduledActionSendBeginMainFrame() override; + virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override; + virtual DrawResult ScheduledActionDrawAndSwapForced() override; + virtual void ScheduledActionCommit() override; + virtual void ScheduledActionAnimate() override; + virtual void ScheduledActionUpdateVisibleTiles() override; + virtual void ScheduledActionActivateSyncTree() override; + virtual void ScheduledActionBeginOutputSurfaceCreation() override; + virtual void ScheduledActionManageTiles() override; + virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; + virtual base::TimeDelta DrawDurationEstimate() override; + virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; + virtual base::TimeDelta CommitToActivateDurationEstimate() override; + virtual void DidBeginImplFrameDeadline() override; // LayerTreeHostImplClient implementation - virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; - virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; + virtual void UpdateRendererCapabilitiesOnImplThread() override; + virtual void DidLoseOutputSurfaceOnImplThread() override; virtual void CommitVSyncParameters(base::TimeTicks timebase, - base::TimeDelta interval) OVERRIDE {} - virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {} - virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {} - virtual void DidSwapBuffersOnImplThread() OVERRIDE; - virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE; - virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; - virtual void NotifyReadyToActivate() OVERRIDE; - virtual void SetNeedsRedrawOnImplThread() OVERRIDE; + base::TimeDelta interval) override {} + virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override {} + virtual void SetMaxSwapsPendingOnImplThread(int max) override {} + virtual void DidSwapBuffersOnImplThread() override; + virtual void DidSwapBuffersCompleteOnImplThread() override; + virtual void OnCanDrawStateChanged(bool can_draw) override; + virtual void NotifyReadyToActivate() override; + virtual void SetNeedsRedrawOnImplThread() override; virtual void SetNeedsRedrawRectOnImplThread( - const gfx::Rect& dirty_rect) OVERRIDE; - virtual void SetNeedsAnimateOnImplThread() OVERRIDE; - virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; - virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; - virtual void SetNeedsCommitOnImplThread() OVERRIDE; + const gfx::Rect& dirty_rect) override; + virtual void SetNeedsAnimateOnImplThread() override; + virtual void SetNeedsManageTilesOnImplThread() override; + virtual void DidInitializeVisibleTileOnImplThread() override; + virtual void SetNeedsCommitOnImplThread() override; virtual void PostAnimationEventsToMainThreadOnImplThread( - scoped_ptr<AnimationEventsVector> events) OVERRIDE; + scoped_ptr<AnimationEventsVector> events) override; virtual bool ReduceContentsTextureMemoryOnImplThread( size_t limit_bytes, - int priority_cutoff) OVERRIDE; - virtual bool IsInsideDraw() OVERRIDE; - virtual void RenewTreePriority() OVERRIDE {} + int priority_cutoff) override; + virtual bool IsInsideDraw() override; + virtual void RenewTreePriority() override {} virtual void PostDelayedScrollbarFadeOnImplThread( const base::Closure& start_fade, - base::TimeDelta delay) OVERRIDE {} - virtual void DidActivateSyncTree() OVERRIDE {} - virtual void DidManageTiles() OVERRIDE; - virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} + base::TimeDelta delay) override {} + virtual void DidActivateSyncTree() override {} + virtual void DidManageTiles() override; + virtual void SetDebugState(const LayerTreeDebugState& debug_state) override {} void RequestNewOutputSurface(); diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h index ed5c269..817b36d 100644 --- a/cc/trees/thread_proxy.h +++ b/cc/trees/thread_proxy.h @@ -150,85 +150,85 @@ class CC_EXPORT ThreadProxy : public Proxy, const CompositorThreadOnly& impl() const; // Proxy implementation - virtual void FinishAllRendering() OVERRIDE; - virtual bool IsStarted() const OVERRIDE; - virtual void SetOutputSurface(scoped_ptr<OutputSurface>) OVERRIDE; - virtual void SetLayerTreeHostClientReady() OVERRIDE; - virtual void SetVisible(bool visible) OVERRIDE; - virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; - virtual void SetNeedsAnimate() OVERRIDE; - virtual void SetNeedsUpdateLayers() OVERRIDE; - virtual void SetNeedsCommit() OVERRIDE; - virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; - virtual void SetNextCommitWaitsForActivation() OVERRIDE; - virtual void NotifyInputThrottledUntilCommit() OVERRIDE; - virtual void SetDeferCommits(bool defer_commits) OVERRIDE; - virtual bool CommitRequested() const OVERRIDE; - virtual bool BeginMainFrameRequested() const OVERRIDE; - virtual void MainThreadHasStoppedFlinging() OVERRIDE; - virtual void Start() OVERRIDE; - virtual void Stop() OVERRIDE; - virtual size_t MaxPartialTextureUpdates() const OVERRIDE; - virtual void ForceSerializeOnSwapBuffers() OVERRIDE; - virtual bool SupportsImplScrolling() const OVERRIDE; - virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE; - virtual void AsValueInto(base::debug::TracedValue* value) const OVERRIDE; - virtual bool MainFrameWillHappenForTesting() OVERRIDE; + virtual void FinishAllRendering() override; + virtual bool IsStarted() const override; + virtual void SetOutputSurface(scoped_ptr<OutputSurface>) override; + virtual void SetLayerTreeHostClientReady() override; + virtual void SetVisible(bool visible) override; + virtual const RendererCapabilities& GetRendererCapabilities() const override; + virtual void SetNeedsAnimate() override; + virtual void SetNeedsUpdateLayers() override; + virtual void SetNeedsCommit() override; + virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) override; + virtual void SetNextCommitWaitsForActivation() override; + virtual void NotifyInputThrottledUntilCommit() override; + virtual void SetDeferCommits(bool defer_commits) override; + virtual bool CommitRequested() const override; + virtual bool BeginMainFrameRequested() const override; + virtual void MainThreadHasStoppedFlinging() override; + virtual void Start() override; + virtual void Stop() override; + virtual size_t MaxPartialTextureUpdates() const override; + virtual void ForceSerializeOnSwapBuffers() override; + virtual bool SupportsImplScrolling() const override; + virtual void SetDebugState(const LayerTreeDebugState& debug_state) override; + virtual void AsValueInto(base::debug::TracedValue* value) const override; + virtual bool MainFrameWillHappenForTesting() override; // LayerTreeHostImplClient implementation - virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; - virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; + virtual void UpdateRendererCapabilitiesOnImplThread() override; + virtual void DidLoseOutputSurfaceOnImplThread() override; virtual void CommitVSyncParameters(base::TimeTicks timebase, - base::TimeDelta interval) OVERRIDE; - virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE; - virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE; - virtual void DidSwapBuffersOnImplThread() OVERRIDE; - virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE; - virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; - virtual void NotifyReadyToActivate() OVERRIDE; + base::TimeDelta interval) override; + virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; + virtual void SetMaxSwapsPendingOnImplThread(int max) override; + virtual void DidSwapBuffersOnImplThread() override; + virtual void DidSwapBuffersCompleteOnImplThread() override; + virtual void OnCanDrawStateChanged(bool can_draw) override; + virtual void NotifyReadyToActivate() override; // Please call these 3 functions through // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and // SetNeedsAnimate(). - virtual void SetNeedsRedrawOnImplThread() OVERRIDE; + virtual void SetNeedsRedrawOnImplThread() override; virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) - OVERRIDE; - virtual void SetNeedsAnimateOnImplThread() OVERRIDE; - virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; - virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; - virtual void SetNeedsCommitOnImplThread() OVERRIDE; + override; + virtual void SetNeedsAnimateOnImplThread() override; + virtual void SetNeedsManageTilesOnImplThread() override; + virtual void DidInitializeVisibleTileOnImplThread() override; + virtual void SetNeedsCommitOnImplThread() override; virtual void PostAnimationEventsToMainThreadOnImplThread( - scoped_ptr<AnimationEventsVector> queue) OVERRIDE; + scoped_ptr<AnimationEventsVector> queue) override; virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, int priority_cutoff) - OVERRIDE; - virtual bool IsInsideDraw() OVERRIDE; - virtual void RenewTreePriority() OVERRIDE; + override; + virtual bool IsInsideDraw() override; + virtual void RenewTreePriority() override; virtual void PostDelayedScrollbarFadeOnImplThread( const base::Closure& start_fade, - base::TimeDelta delay) OVERRIDE; - virtual void DidActivateSyncTree() OVERRIDE; - virtual void DidManageTiles() OVERRIDE; + base::TimeDelta delay) override; + virtual void DidActivateSyncTree() override; + virtual void DidManageTiles() override; // SchedulerClient implementation - virtual BeginFrameSource* ExternalBeginFrameSource() OVERRIDE; - virtual void WillBeginImplFrame(const BeginFrameArgs& args) OVERRIDE; - virtual void ScheduledActionSendBeginMainFrame() OVERRIDE; - virtual DrawResult ScheduledActionDrawAndSwapIfPossible() OVERRIDE; - virtual DrawResult ScheduledActionDrawAndSwapForced() OVERRIDE; - virtual void ScheduledActionAnimate() OVERRIDE; - virtual void ScheduledActionCommit() OVERRIDE; - virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; - virtual void ScheduledActionActivateSyncTree() OVERRIDE; - virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; - virtual void ScheduledActionManageTiles() OVERRIDE; - virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; - virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; - virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; - virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; - virtual void DidBeginImplFrameDeadline() OVERRIDE; + virtual BeginFrameSource* ExternalBeginFrameSource() override; + virtual void WillBeginImplFrame(const BeginFrameArgs& args) override; + virtual void ScheduledActionSendBeginMainFrame() override; + virtual DrawResult ScheduledActionDrawAndSwapIfPossible() override; + virtual DrawResult ScheduledActionDrawAndSwapForced() override; + virtual void ScheduledActionAnimate() override; + virtual void ScheduledActionCommit() override; + virtual void ScheduledActionUpdateVisibleTiles() override; + virtual void ScheduledActionActivateSyncTree() override; + virtual void ScheduledActionBeginOutputSurfaceCreation() override; + virtual void ScheduledActionManageTiles() override; + virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; + virtual base::TimeDelta DrawDurationEstimate() override; + virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; + virtual base::TimeDelta CommitToActivateDurationEstimate() override; + virtual void DidBeginImplFrameDeadline() override; // ResourceUpdateControllerClient implementation - virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; + virtual void ReadyToFinalizeTextureUpdates() override; protected: ThreadProxy(LayerTreeHost* layer_tree_host, diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc index 007c857..faa86ce 100644 --- a/cc/trees/tree_synchronizer_unittest.cc +++ b/cc/trees/tree_synchronizer_unittest.cc @@ -55,11 +55,11 @@ class MockLayer : public Layer { } virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) - OVERRIDE { + override { return MockLayerImpl::Create(tree_impl, layer_id_); } - virtual void PushPropertiesTo(LayerImpl* layer_impl) OVERRIDE { + virtual void PushPropertiesTo(LayerImpl* layer_impl) override { Layer::PushPropertiesTo(layer_impl); MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl); @@ -91,7 +91,7 @@ class FakeLayerAnimationController : public LayerAnimationController { virtual ~FakeLayerAnimationController() {} virtual void PushAnimationUpdatesTo(LayerAnimationController* controller_impl) - OVERRIDE { + override { LayerAnimationController::PushAnimationUpdatesTo(controller_impl); synchronized_animations_ = true; } |