diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:15:06 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 21:15:06 +0000 |
commit | bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d (patch) | |
tree | dba84d59df6abc81803ce0191ccb78c42d4ca55b /cc | |
parent | 01fc514f488305c0c57038c3d5c7b28eb09df4cd (diff) | |
download | chromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.zip chromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.tar.gz chromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.tar.bz2 |
Fix cpplint errors in cc/(animation|input|layers|trees|test)/
This fixes lint errors in everything except for the few stragglers (occlusion unit test, etc) that haven't been chromified.
BUG=144577
Review URL: https://chromiumcodereview.appspot.com/12965007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
116 files changed, 359 insertions, 267 deletions
diff --git a/cc/animation/animation_id_provider.h b/cc/animation/animation_id_provider.h index da08c92..a8d3a5b 100644 --- a/cc/animation/animation_id_provider.h +++ b/cc/animation/animation_id_provider.h @@ -16,6 +16,6 @@ class CC_EXPORT AnimationIdProvider { static int NextGroupId(); }; -} +} // namespace cc #endif // CC_ANIMATION_ANIMATION_ID_PROVIDER_H_ diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h index 09f269c..6d775c9 100644 --- a/cc/animation/keyframed_animation_curve.h +++ b/cc/animation/keyframed_animation_curve.h @@ -98,7 +98,8 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve { DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve); }; -class CC_EXPORT KeyframedTransformAnimationCurve : public TransformAnimationCurve { +class CC_EXPORT KeyframedTransformAnimationCurve + : public TransformAnimationCurve { public: // It is required that the keyframes be sorted by time. static scoped_ptr<KeyframedTransformAnimationCurve> Create(); diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc index 333490a..dac393e 100644 --- a/cc/animation/keyframed_animation_curve_unittest.cc +++ b/cc/animation/keyframed_animation_curve_unittest.cc @@ -178,8 +178,8 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) { // There is a discontinuity at 1. Any value between 4 and 6 is valid. gfx::Transform value = curve->GetValue(1.f); - EXPECT_TRUE(value.matrix().getDouble(0.f, 3.f) >= 4); - EXPECT_TRUE(value.matrix().getDouble(0.f, 3.f) <= 6); + EXPECT_GE(value.matrix().getDouble(0.f, 3.f), 4); + EXPECT_LE(value.matrix().getDouble(0.f, 3.f), 6); ExpectTranslateX(6.f, curve->GetValue(1.5f)); ExpectTranslateX(6.f, curve->GetValue(2.f)); diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc index 5f7ad26..6ab3528 100644 --- a/cc/animation/layer_animation_controller.cc +++ b/cc/animation/layer_animation_controller.cc @@ -43,7 +43,7 @@ void LayerAnimationController::PauseAnimation(int animation_id, } struct HasAnimationId { - HasAnimationId(int id) : id_(id) {} + explicit HasAnimationId(int id) : id_(id) {} bool operator()(Animation* animation) const { return animation->id() == id_; } @@ -160,8 +160,7 @@ void LayerAnimationController::AccumulatePropertyUpdates( monotonic_time); events->push_back(event); - } - else if (animation->target_property() == Animation::Transform) { + } else if (animation->target_property() == Animation::Transform) { AnimationEvent event(AnimationEvent::PropertyUpdate, id_, animation->group(), @@ -305,7 +304,7 @@ void LayerAnimationController::PushNewAnimationsToImplThread( } struct IsCompleted { - IsCompleted(const LayerAnimationController& main_thread_controller) + explicit IsCompleted(const LayerAnimationController& main_thread_controller) : main_thread_controller_(main_thread_controller) {} bool operator()(Animation* animation) const { if (animation->is_impl_only()) @@ -564,7 +563,6 @@ void LayerAnimationController::TickAnimations(double monotonic_time) { trimmed = 0; switch (active_animations_[i]->target_property()) { - case Animation::Transform: { const TransformAnimationCurve* transform_animation_curve = active_animations_[i]->curve()->ToTransformAnimationCurve(); diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h index 1de1131..866377f 100644 --- a/cc/animation/layer_animation_controller.h +++ b/cc/animation/layer_animation_controller.h @@ -93,7 +93,7 @@ class CC_EXPORT LayerAnimationController protected: friend class base::RefCounted<LayerAnimationController>; - LayerAnimationController(int id); + explicit LayerAnimationController(int id); virtual ~LayerAnimationController(); private: diff --git a/cc/animation/layer_animation_event_observer.h b/cc/animation/layer_animation_event_observer.h index b20c590..9f7f04b 100644 --- a/cc/animation/layer_animation_event_observer.h +++ b/cc/animation/layer_animation_event_observer.h @@ -5,14 +5,19 @@ #ifndef CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_ #define CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_ +#include "cc/base/cc_export.h" + namespace cc { class CC_EXPORT LayerAnimationEventObserver { public: virtual void OnAnimationStarted(const AnimationEvent& event) = 0; + + protected: + virtual ~LayerAnimationEventObserver() {} }; -} // namespace cc +} // namespace cc #endif // CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_ diff --git a/cc/animation/layer_animation_value_observer.h b/cc/animation/layer_animation_value_observer.h index 5919d8c..ca3cafa 100644 --- a/cc/animation/layer_animation_value_observer.h +++ b/cc/animation/layer_animation_value_observer.h @@ -5,6 +5,8 @@ #ifndef CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_ #define CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_ +#include "cc/base/cc_export.h" + namespace cc { class CC_EXPORT LayerAnimationValueObserver { @@ -16,7 +18,7 @@ class CC_EXPORT LayerAnimationValueObserver { virtual bool IsActive() const = 0; }; -} // namespace cc +} // namespace cc #endif // CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_ diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.h b/cc/animation/scrollbar_animation_controller_linear_fade.h index 19a94d8..bc6972c 100644 --- a/cc/animation/scrollbar_animation_controller_linear_fade.h +++ b/cc/animation/scrollbar_animation_controller_linear_fade.h @@ -12,8 +12,8 @@ namespace cc { class LayerImpl; -class CC_EXPORT ScrollbarAnimationControllerLinearFade : - public ScrollbarAnimationController { +class CC_EXPORT ScrollbarAnimationControllerLinearFade + : public ScrollbarAnimationController { public: static scoped_ptr<ScrollbarAnimationControllerLinearFade> Create( LayerImpl* scroll_layer, diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc index 65769b4..b4e6917 100644 --- a/cc/animation/transform_operation.cc +++ b/cc/animation/transform_operation.cc @@ -115,10 +115,10 @@ bool TransformOperation::BlendTransformOperations( double axis_z = 1; double from_angle = 0; double to_angle = IsOperationIdentity(to) ? 0 : to->rotate.angle; - if (ShareSameAxis(from, to, axis_x, axis_y, axis_z, from_angle)) + if (ShareSameAxis(from, to, axis_x, axis_y, axis_z, from_angle)) { result.RotateAbout(gfx::Vector3dF(axis_x, axis_y, axis_z), BlendDoubles(from_angle, to_angle, progress)); - else { + } else { gfx::Transform to_matrix; if (!IsOperationIdentity(to)) to_matrix = to->matrix; diff --git a/cc/animation/transform_operations.cc b/cc/animation/transform_operations.cc index 4de283e..bc7a0c3 100644 --- a/cc/animation/transform_operations.cc +++ b/cc/animation/transform_operations.cc @@ -3,6 +3,9 @@ // found in the LICENSE file. #include "cc/animation/transform_operations.h" + +#include <algorithm> + #include "ui/gfx/transform_util.h" #include "ui/gfx/vector3d_f.h" diff --git a/cc/animation/transform_operations_unittest.cc b/cc/animation/transform_operations_unittest.cc index 206a9f6..7e344c7 100644 --- a/cc/animation/transform_operations_unittest.cc +++ b/cc/animation/transform_operations_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <limits> + #include "base/memory/scoped_vector.h" #include "cc/animation/transform_operations.h" #include "cc/test/geometry_test_utils.h" diff --git a/cc/input/page_scale_animation.cc b/cc/input/page_scale_animation.cc index f4f4061..d4b139b 100644 --- a/cc/input/page_scale_animation.cc +++ b/cc/input/page_scale_animation.cc @@ -35,7 +35,7 @@ gfx::Vector2dF InterpolateBetween(gfx::Vector2dF start, return start + gfx::ScaleVector2d(end - start, interp); } -} +} // namespace namespace cc { diff --git a/cc/input/pinch_zoom_scrollbar.h b/cc/input/pinch_zoom_scrollbar.h index aad5b27..2aa6005 100644 --- a/cc/input/pinch_zoom_scrollbar.h +++ b/cc/input/pinch_zoom_scrollbar.h @@ -42,11 +42,11 @@ class PinchZoomScrollbar : public WebKit::WebScrollbar { virtual WebKit::WebScrollbar::Orientation orientation() const; private: - DISALLOW_COPY_AND_ASSIGN(PinchZoomScrollbar); - WebKit::WebScrollbar::Orientation orientation_; LayerTreeHost* owner_; + + DISALLOW_COPY_AND_ASSIGN(PinchZoomScrollbar); }; // class PinchZoomScrollbar } // namespace cc -#endif // CC_INPUT_PINCH_ZOOM_SCROLLBAR_H_ +#endif // CC_INPUT_PINCH_ZOOM_SCROLLBAR_H_ diff --git a/cc/input/pinch_zoom_scrollbar_geometry.cc b/cc/input/pinch_zoom_scrollbar_geometry.cc index 9f1dce9..68c42b53 100644 --- a/cc/input/pinch_zoom_scrollbar_geometry.cc +++ b/cc/input/pinch_zoom_scrollbar_geometry.cc @@ -4,6 +4,8 @@ #include "cc/input/pinch_zoom_scrollbar_geometry.h" +#include <algorithm> + #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" namespace cc { @@ -42,7 +44,7 @@ int PinchZoomScrollbarGeometry::thumbLength(WebScrollbar* scrollbar) { return length; } -int PinchZoomScrollbarGeometry::trackPosition(WebScrollbar*) { +int PinchZoomScrollbarGeometry::trackPosition(WebScrollbar* scrollbar) { return 0; } @@ -54,11 +56,11 @@ int PinchZoomScrollbarGeometry::trackLength(WebScrollbar* scrollbar) { return track.height; } -bool PinchZoomScrollbarGeometry::hasButtons(WebScrollbar*) { +bool PinchZoomScrollbarGeometry::hasButtons(WebScrollbar* scrollbar) { return false; } -bool PinchZoomScrollbarGeometry::hasThumb(WebScrollbar*) { +bool PinchZoomScrollbarGeometry::hasThumb(WebScrollbar* scrollbar) { return true; } @@ -90,28 +92,31 @@ int PinchZoomScrollbarGeometry::minimumThumbLength(WebScrollbar* scrollbar) { return scrollbarThickness(scrollbar); } -int PinchZoomScrollbarGeometry::scrollbarThickness(WebScrollbar*) { +int PinchZoomScrollbarGeometry::scrollbarThickness(WebScrollbar* scrollbar) { return kTrackWidth; } -WebRect PinchZoomScrollbarGeometry::backButtonStartRect(WebScrollbar*) { +WebRect PinchZoomScrollbarGeometry::backButtonStartRect( + WebScrollbar* scrollbar) { return WebRect(); } -WebRect PinchZoomScrollbarGeometry::backButtonEndRect(WebScrollbar*) { +WebRect PinchZoomScrollbarGeometry::backButtonEndRect(WebScrollbar* scrollbar) { return WebRect(); } -WebRect PinchZoomScrollbarGeometry::forwardButtonStartRect(WebScrollbar*) { +WebRect PinchZoomScrollbarGeometry::forwardButtonStartRect( + WebScrollbar* scrollbar) { return WebRect(); } -WebRect PinchZoomScrollbarGeometry::forwardButtonEndRect(WebScrollbar*) { +WebRect PinchZoomScrollbarGeometry::forwardButtonEndRect( + WebScrollbar* scrollbar) { return WebRect(); } WebRect PinchZoomScrollbarGeometry::constrainTrackRectToTrackPieces( - WebScrollbar*, const WebRect& rect) { + WebScrollbar* scrollbar, const WebRect& rect) { return rect; } @@ -123,4 +128,4 @@ void PinchZoomScrollbarGeometry::splitTrack( end_track = WebRect(); } -} // namespace cc +} // namespace cc diff --git a/cc/input/pinch_zoom_scrollbar_geometry.h b/cc/input/pinch_zoom_scrollbar_geometry.h index be43fdb3..b2795b1 100644 --- a/cc/input/pinch_zoom_scrollbar_geometry.h +++ b/cc/input/pinch_zoom_scrollbar_geometry.h @@ -43,8 +43,7 @@ class PinchZoomScrollbarGeometry : public WebScrollbarThemeGeometry { virtual void splitTrack( WebScrollbar* scrollbar, const WebRect& track, WebRect& start_track, WebRect& thumb, WebRect& end_track); - }; -} // namespace WebKit +} // namespace WebKit #endif // CC_INPUT_PINCH_ZOOM_SCROLLBAR_GEOMETRY_H_ diff --git a/cc/input/pinch_zoom_scrollbar_painter.cc b/cc/input/pinch_zoom_scrollbar_painter.cc index 147c867..1034e25 100644 --- a/cc/input/pinch_zoom_scrollbar_painter.cc +++ b/cc/input/pinch_zoom_scrollbar_painter.cc @@ -52,7 +52,7 @@ void PinchZoomScrollbarPainter::PaintForwardButtonEnd( } void PinchZoomScrollbarPainter::PaintTickmarks( - SkCanvas* canvas, + SkCanvas* canvas, gfx::Rect rect) { } diff --git a/cc/input/top_controls_manager.h b/cc/input/top_controls_manager.h index e753846..59289f6 100644 --- a/cc/input/top_controls_manager.h +++ b/cc/input/top_controls_manager.h @@ -62,7 +62,7 @@ class CC_EXPORT TopControlsManager float top_controls_hide_threshold); private: - void SetControlsTopOffset(float); + void SetControlsTopOffset(float offset); void ResetAnimations(); void SetupAnimation(AnimationDirection direction); void StartAnimationIfNecessary(); diff --git a/cc/input/top_controls_manager_unittest.cc b/cc/input/top_controls_manager_unittest.cc index 6ff002b..b3bc722c 100644 --- a/cc/input/top_controls_manager_unittest.cc +++ b/cc/input/top_controls_manager_unittest.cc @@ -136,7 +136,7 @@ TEST(TopControlsManagerTest, PartialShownHideAnimation) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_LT(manager->controls_top_offset(), previous_offset); @@ -166,7 +166,7 @@ TEST(TopControlsManagerTest, PartialShownShowAnimation) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_GT(manager->controls_top_offset(), previous_offset); @@ -192,7 +192,7 @@ TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdShows) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_GT(manager->controls_top_offset(), previous_offset); @@ -218,7 +218,7 @@ TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdHides) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_LT(manager->controls_top_offset(), previous_offset); @@ -248,7 +248,7 @@ TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdHides) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_LT(manager->controls_top_offset(), previous_offset); @@ -278,7 +278,7 @@ TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdShows) { base::TimeTicks time = base::TimeTicks::Now(); float previous_offset = manager->controls_top_offset(); - while(manager->animation()) { + while (manager->animation()) { time = base::TimeDelta::FromMicroseconds(100) + time; manager->Animate(time); EXPECT_GT(manager->controls_top_offset(), previous_offset); diff --git a/cc/layers/append_quads_data.h b/cc/layers/append_quads_data.h index 8583711..1ec8184 100644 --- a/cc/layers/append_quads_data.h +++ b/cc/layers/append_quads_data.h @@ -33,5 +33,5 @@ struct AppendQuadsData { const RenderPass::Id render_pass_id; }; -} +} // namespace cc #endif // CC_LAYERS_APPEND_QUADS_DATA_H_ diff --git a/cc/layers/content_layer.h b/cc/layers/content_layer.h index d59b56c..79394de 100644 --- a/cc/layers/content_layer.h +++ b/cc/layers/content_layer.h @@ -68,5 +68,5 @@ class CC_EXPORT ContentLayer : public TiledLayer { DISALLOW_COPY_AND_ASSIGN(ContentLayer); }; -} +} // namespace cc #endif // CC_LAYERS_CONTENT_LAYER_H_ diff --git a/cc/layers/content_layer_client.h b/cc/layers/content_layer_client.h index 1fdf024..e59c1d8 100644 --- a/cc/layers/content_layer_client.h +++ b/cc/layers/content_layer_client.h @@ -30,6 +30,6 @@ class CC_EXPORT ContentLayerClient { virtual ~ContentLayerClient() {} }; -} +} // namespace cc #endif // CC_LAYERS_CONTENT_LAYER_CLIENT_H_ diff --git a/cc/layers/content_layer_unittest.cc b/cc/layers/content_layer_unittest.cc index ab09d81..25421e7 100644 --- a/cc/layers/content_layer_unittest.cc +++ b/cc/layers/content_layer_unittest.cc @@ -11,8 +11,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/rect_conversions.h" -using namespace WebKit; - namespace cc { namespace { diff --git a/cc/layers/contents_scaling_layer_unittest.cc b/cc/layers/contents_scaling_layer_unittest.cc index 7029ffe..2010922 100644 --- a/cc/layers/contents_scaling_layer_unittest.cc +++ b/cc/layers/contents_scaling_layer_unittest.cc @@ -4,6 +4,8 @@ #include "cc/layers/contents_scaling_layer.h" +#include <vector> + #include "cc/test/geometry_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/layers/delegated_renderer_layer.h b/cc/layers/delegated_renderer_layer.h index a789317..a65855d 100644 --- a/cc/layers/delegated_renderer_layer.h +++ b/cc/layers/delegated_renderer_layer.h @@ -45,5 +45,5 @@ class CC_EXPORT DelegatedRendererLayer : public Layer { TransferableResourceArray unused_resources_for_child_compositor_; }; -} +} // namespace cc #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_H_ diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc index e83f9c3..9ae9e33 100644 --- a/cc/layers/delegated_renderer_layer_impl.cc +++ b/cc/layers/delegated_renderer_layer_impl.cc @@ -4,6 +4,9 @@ #include "cc/layers/delegated_renderer_layer_impl.h" +#include <algorithm> +#include <utility> + #include "base/bind.h" #include "cc/base/math_util.h" #include "cc/layers/append_quads_data.h" @@ -51,7 +54,7 @@ static ResourceProvider::ResourceId ResourceRemapHelper( return 0; } - DCHECK(it->first == id); + DCHECK_EQ(it->first, id); ResourceProvider::ResourceId remapped_id = it->second; remapped_resources->insert(remapped_id); return remapped_id; @@ -160,7 +163,8 @@ void DelegatedRendererLayerImpl::ClearRenderPasses() { scoped_ptr<LayerImpl> DelegatedRendererLayerImpl::CreateLayerImpl( LayerTreeImpl* tree_impl) { - return DelegatedRendererLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); + return DelegatedRendererLayerImpl::Create( + tree_impl, id()).PassAs<LayerImpl>(); } void DelegatedRendererLayerImpl::DidLoseOutputSurface() { @@ -210,7 +214,7 @@ void DelegatedRendererLayerImpl::AppendContributingRenderPasses( ConvertDelegatedRenderPassId(render_passes_in_draw_order_[i]->id); // Don't clash with the RenderPass we generate if we own a RenderSurface. - DCHECK(output_render_pass_id.index > 0); + DCHECK_GT(output_render_pass_id.index, 0); render_pass_sink->AppendRenderPass( render_passes_in_draw_order_[i]->Copy(output_render_pass_id)); diff --git a/cc/layers/delegated_renderer_layer_impl.h b/cc/layers/delegated_renderer_layer_impl.h index d768ea6..b5e2467 100644 --- a/cc/layers/delegated_renderer_layer_impl.h +++ b/cc/layers/delegated_renderer_layer_impl.h @@ -22,7 +22,8 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { virtual ~DelegatedRendererLayerImpl(); // LayerImpl overrides. - virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl*) OVERRIDE; + virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) + OVERRIDE; virtual bool HasDelegatedContent() const OVERRIDE; virtual bool HasContributingDelegatedRenderPasses() const OVERRIDE; virtual RenderPass::Id FirstContributingRenderPassId() const OVERRIDE; @@ -87,6 +88,6 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { int child_id_; }; -} +} // namespace cc #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_ diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc index 23207be..bdff25f 100644 --- a/cc/layers/delegated_renderer_layer_impl_unittest.cc +++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc @@ -94,20 +94,20 @@ class DelegatedRendererLayerImplTestSimple ScopedPtrVector<RenderPass> delegated_render_passes; TestRenderPass* pass1 = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(9, 6), gfx::Rect(6, 6, 6, 6), gfx::Transform()); AddQuad(pass1, gfx::Rect(0, 0, 6, 6), 33u); TestRenderPass* pass2 = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(9, 7), gfx::Rect(7, 7, 7, 7), gfx::Transform()); AddQuad(pass2, gfx::Rect(0, 0, 7, 7), 22u); AddRenderPassQuad(pass2, pass1); TestRenderPass* pass3 = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(9, 8), gfx::Rect(0, 0, 8, 8), gfx::Transform()); @@ -470,7 +470,7 @@ class DelegatedRendererLayerImplTestTransform root_layer->SetBounds(gfx::Size(100, 100)); delegated_renderer_layer->SetPosition(gfx::Point(20, 20)); - delegated_renderer_layer->SetBounds(gfx::Size(30, 30)); + delegated_renderer_layer->SetBounds(gfx::Size(30, 30)); delegated_renderer_layer->SetContentBounds(gfx::Size(30, 30)); delegated_renderer_layer->SetDrawsContent(true); gfx::Transform transform; @@ -490,7 +490,7 @@ class DelegatedRendererLayerImplTestTransform { TestRenderPass* pass = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(10, 7), child_pass_rect, gfx::Transform()); @@ -525,7 +525,7 @@ class DelegatedRendererLayerImplTestTransform bool root_pass_clipped = root_delegated_render_pass_is_clipped_; TestRenderPass* pass = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(9, 6), root_pass_rect, gfx::Transform()); @@ -887,7 +887,7 @@ class DelegatedRendererLayerImplTestClip { TestRenderPass* pass = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(10, 7), child_pass_rect, gfx::Transform()); @@ -920,7 +920,7 @@ class DelegatedRendererLayerImplTestClip bool root_pass_clipped = root_delegated_render_pass_is_clipped_; TestRenderPass* pass = AddRenderPass( - delegated_render_passes, + &delegated_render_passes, RenderPass::Id(9, 6), root_pass_rect, gfx::Transform()); diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc index f2d46ed..76016b5 100644 --- a/cc/layers/heads_up_display_layer.cc +++ b/cc/layers/heads_up_display_layer.cc @@ -4,6 +4,8 @@ #include "cc/layers/heads_up_display_layer.h" +#include <algorithm> + #include "base/debug/trace_event.h" #include "cc/layers/heads_up_display_layer_impl.h" #include "cc/trees/layer_tree_host.h" diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc index 4706f34..270e04d 100644 --- a/cc/layers/heads_up_display_layer_impl.cc +++ b/cc/layers/heads_up_display_layer_impl.cc @@ -4,6 +4,9 @@ #include "cc/layers/heads_up_display_layer_impl.h" +#include <algorithm> +#include <vector> + #include "base/stringprintf.h" #include "base/strings/string_split.h" #include "cc/debug/debug_colors.h" @@ -17,7 +20,6 @@ #include "cc/resources/tile_manager.h" #include "cc/trees/layer_tree_impl.h" #include "skia/ext/platform_canvas.h" -#include "skia/ext/platform_canvas.h" #include "third_party/khronos/GLES2/gl2.h" #include "third_party/khronos/GLES2/gl2ext.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/cc/layers/heads_up_display_layer_impl.h b/cc/layers/heads_up_display_layer_impl.h index 3bc3cf2..0940dea 100644 --- a/cc/layers/heads_up_display_layer_impl.h +++ b/cc/layers/heads_up_display_layer_impl.h @@ -5,6 +5,8 @@ #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ +#include <string> + #include "base/memory/scoped_ptr.h" #include "base/time.h" #include "cc/base/cc_export.h" diff --git a/cc/layers/io_surface_layer.h b/cc/layers/io_surface_layer.h index 4073a0d..67d8e21 100644 --- a/cc/layers/io_surface_layer.h +++ b/cc/layers/io_surface_layer.h @@ -31,5 +31,5 @@ class CC_EXPORT IOSurfaceLayer : public Layer { gfx::Size io_surface_size_; }; -} +} // namespace cc #endif // CC_LAYERS_IO_SURFACE_LAYER_H_ diff --git a/cc/layers/io_surface_layer_impl.h b/cc/layers/io_surface_layer_impl.h index 2c04ddd..1f40215 100644 --- a/cc/layers/io_surface_layer_impl.h +++ b/cc/layers/io_surface_layer_impl.h @@ -5,6 +5,8 @@ #ifndef CC_LAYERS_IO_SURFACE_LAYER_IMPL_H_ #define CC_LAYERS_IO_SURFACE_LAYER_IMPL_H_ +#include <string> + #include "cc/base/cc_export.h" #include "cc/layers/layer_impl.h" #include "ui/gfx/size.h" diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index e72e7b1..bdd2a4f 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -4,6 +4,8 @@ #include "cc/layers/layer.h" +#include <algorithm> + #include "base/metrics/histogram.h" #include "cc/animation/animation.h" #include "cc/animation/animation_events.h" @@ -106,7 +108,6 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) { if (host && (!filters_.isEmpty() || !background_filters_.isEmpty() || filter_)) layer_tree_host_->set_needs_filter_context(); - } void Layer::SetNeedsCommit() { diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index 2ed7656..da5ca13 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -57,7 +57,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) #endif horizontal_scrollbar_layer_(NULL), vertical_scrollbar_layer_(NULL) { - DCHECK(layer_id_ > 0); + DCHECK_GT(layer_id_, 0); DCHECK(layer_tree_impl_); layer_tree_impl_->RegisterLayer(this); AnimationRegistrar* registrar = layer_tree_impl_->animationRegistrar(); @@ -935,7 +935,6 @@ void LayerImpl::DidBecomeActive() { } else { scrollbar_animation_controller_.reset(); } - } void LayerImpl::SetHorizontalScrollbarLayer( ScrollbarLayerImpl* scrollbar_layer) { @@ -961,7 +960,6 @@ void LayerImpl::AsValueInto(base::DictionaryValue* dict) const { gfx::QuadF(gfx::Rect(content_bounds())), &clipped); dict->Set("layer_quad", MathUtil::AsValue(layer_quad).release()); - } scoped_ptr<base::Value> LayerImpl::AsValue() const { diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index f33e644..2bee592 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -242,7 +242,7 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver { return draw_properties_.render_target; } RenderSurfaceImpl* render_surface() const { - return draw_properties_.render_surface.get(); + return draw_properties_.render_surface.get(); } // The client should be responsible for setting bounds, content bounds and @@ -523,6 +523,6 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver { DISALLOW_COPY_AND_ASSIGN(LayerImpl); }; -} +} // namespace cc #endif // CC_LAYERS_LAYER_IMPL_H_ diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc index cb65d76..5bbf4e2 100644 --- a/cc/layers/layer_impl_unittest.cc +++ b/cc/layers/layer_impl_unittest.cc @@ -15,7 +15,8 @@ #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations.h" #include "third_party/skia/include/effects/SkBlurImageFilter.h" -using namespace WebKit; +using WebKit::WebFilterOperation; +using WebKit::WebFilterOperations; namespace cc { namespace { diff --git a/cc/layers/layer_iterator.cc b/cc/layers/layer_iterator.cc index 5891168..39e4c2c 100644 --- a/cc/layers/layer_iterator.cc +++ b/cc/layers/layer_iterator.cc @@ -4,6 +4,8 @@ #include "cc/layers/layer_iterator.h" +#include <vector> + #include "cc/layers/layer.h" #include "cc/layers/layer_impl.h" #include "cc/layers/render_surface.h" diff --git a/cc/layers/layer_iterator.h b/cc/layers/layer_iterator.h index 3e00a63..bd1d63b 100644 --- a/cc/layers/layer_iterator.h +++ b/cc/layers/layer_iterator.h @@ -84,7 +84,7 @@ namespace cc { // is representing, and you can query the iterator to decide // what actions to perform with the layer given what it represents. -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // Non-templated constants struct LayerIteratorValue { diff --git a/cc/layers/layer_iterator_unittest.cc b/cc/layers/layer_iterator_unittest.cc index bc3f81e..cb2b5b1 100644 --- a/cc/layers/layer_iterator_unittest.cc +++ b/cc/layers/layer_iterator_unittest.cc @@ -4,6 +4,8 @@ #include "cc/layers/layer_iterator.h" +#include <vector> + #include "cc/layers/layer.h" #include "cc/trees/layer_tree_host_common.h" #include "testing/gmock/include/gmock/gmock.h" @@ -158,7 +160,6 @@ TEST(LayerIteratorTest, SimpleTree) { EXPECT_COUNT(second, -1, -1, 2); EXPECT_COUNT(third, -1, -1, 1); EXPECT_COUNT(fourth, -1, -1, 0); - } TEST(LayerIteratorTest, ComplexTree) { @@ -213,7 +214,6 @@ TEST(LayerIteratorTest, ComplexTree) { EXPECT_COUNT(root23, -1, -1, 2); EXPECT_COUNT(root231, -1, -1, 1); EXPECT_COUNT(root3, -1, -1, 0); - } TEST(LayerIteratorTest, ComplexTreeMultiSurface) { diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc index 4184e0b..da4283f 100644 --- a/cc/layers/layer_unittest.cc +++ b/cc/layers/layer_unittest.cc @@ -44,7 +44,7 @@ namespace { class MockLayerTreeHost : public LayerTreeHost { public: - MockLayerTreeHost(LayerTreeHostClient* client) + explicit MockLayerTreeHost(LayerTreeHostClient* client) : LayerTreeHost(client, LayerTreeSettings()) { Initialize(scoped_ptr<Thread>(NULL)); } diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc index f66fb49..45c69eb 100644 --- a/cc/layers/nine_patch_layer.cc +++ b/cc/layers/nine_patch_layer.cc @@ -113,4 +113,4 @@ void NinePatchLayer::PushPropertiesTo(LayerImpl* layer) { } } -} +} // namespace cc diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc index 69432bf..f41b550 100644 --- a/cc/layers/nine_patch_layer_impl.cc +++ b/cc/layers/nine_patch_layer_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "nine_patch_layer_impl.h" +#include "cc/layers/nine_patch_layer_impl.h" #include "base/stringprintf.h" #include "base/values.h" diff --git a/cc/layers/nine_patch_layer_impl.h b/cc/layers/nine_patch_layer_impl.h index ff89ac1c..d87f785 100644 --- a/cc/layers/nine_patch_layer_impl.h +++ b/cc/layers/nine_patch_layer_impl.h @@ -5,6 +5,8 @@ #ifndef CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ #define CC_LAYERS_NINE_PATCH_LAYER_IMPL_H_ +#include <string> + #include "cc/base/cc_export.h" #include "cc/layers/layer_impl.h" #include "cc/resources/resource_provider.h" diff --git a/cc/layers/nine_patch_layer_unittest.cc b/cc/layers/nine_patch_layer_unittest.cc index 2fcd2af..a274100 100644 --- a/cc/layers/nine_patch_layer_unittest.cc +++ b/cc/layers/nine_patch_layer_unittest.cc @@ -30,7 +30,7 @@ namespace { class MockLayerTreeHost : public LayerTreeHost { public: - MockLayerTreeHost(LayerTreeHostClient* client) + explicit MockLayerTreeHost(LayerTreeHostClient* client) : LayerTreeHost(client, LayerTreeSettings()) { Initialize(scoped_ptr<Thread>(NULL)); } diff --git a/cc/layers/picture_image_layer_impl.cc b/cc/layers/picture_image_layer_impl.cc index 5c18d01..7cf7268 100644 --- a/cc/layers/picture_image_layer_impl.cc +++ b/cc/layers/picture_image_layer_impl.cc @@ -4,6 +4,8 @@ #include "cc/layers/picture_image_layer_impl.h" +#include <algorithm> + #include "cc/debug/debug_colors.h" #include "cc/trees/layer_tree_impl.h" diff --git a/cc/layers/picture_image_layer_impl.h b/cc/layers/picture_image_layer_impl.h index 943981e..4a2db50 100644 --- a/cc/layers/picture_image_layer_impl.h +++ b/cc/layers/picture_image_layer_impl.h @@ -36,6 +36,6 @@ class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl { DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl); }; -} +} // namespace cc #endif // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc index 2ae8255..c6f341a 100644 --- a/cc/layers/picture_layer.cc +++ b/cc/layers/picture_layer.cc @@ -15,11 +15,11 @@ scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) { return make_scoped_refptr(new PictureLayer(client)); } -PictureLayer::PictureLayer(ContentLayerClient* client) : - client_(client), - pile_(make_scoped_refptr(new PicturePile())), - instrumentation_object_tracker_(id()), - is_mask_(false) { +PictureLayer::PictureLayer(ContentLayerClient* client) + : client_(client), + pile_(make_scoped_refptr(new PicturePile())), + instrumentation_object_tracker_(id()), + is_mask_(false) { } PictureLayer::~PictureLayer() { diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index 8e0d06f..9d456fc 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -4,6 +4,8 @@ #include "cc/layers/picture_layer_impl.h" +#include <algorithm> + #include "base/time.h" #include "cc/base/math_util.h" #include "cc/base/util.h" @@ -154,7 +156,6 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, ideal_contents_scale_); iter; ++iter) { - gfx::Rect geometry_rect = iter.geometry_rect(); if (!*iter || !iter->drawing_info().IsReadyToDraw()) { if (DrawCheckerboardForMissingTiles()) { @@ -207,7 +208,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, case ManagedTileState::DrawingInfo::TRANSPARENT_MODE: break; case ManagedTileState::DrawingInfo::PICTURE_PILE_MODE: - // TODO: crbug.com/173011 would fill this part in. + // TODO(leandrogarcia): crbug.com/173011 would fill this part in. default: NOTREACHED(); } @@ -576,8 +577,8 @@ void PictureLayerImpl::RemoveTiling(float contents_scale) { namespace { inline float PositiveRatio(float float1, float float2) { - DCHECK(float1 > 0); - DCHECK(float2 > 0); + DCHECK_GT(float1, 0); + DCHECK_GT(float2, 0); return float1 > float2 ? float1 / float2 : float2 / float1; } diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h index c94d275..672acf7 100644 --- a/cc/layers/picture_layer_impl.h +++ b/cc/layers/picture_layer_impl.h @@ -5,6 +5,9 @@ #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ +#include <string> +#include <vector> + #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" #include "cc/layers/layer_impl.h" @@ -120,6 +123,6 @@ class CC_EXPORT PictureLayerImpl DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); }; -} +} // namespace cc #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index 1d50b25..962d927 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc @@ -4,6 +4,8 @@ #include "cc/layers/picture_layer_impl.h" +#include <utility> + #include "cc/layers/picture_layer.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/fake_impl_proxy.h" diff --git a/cc/layers/render_surface.h b/cc/layers/render_surface.h index 4373e34..5e29889 100644 --- a/cc/layers/render_surface.h +++ b/cc/layers/render_surface.h @@ -68,7 +68,7 @@ class CC_EXPORT RenderSurface { void SetTargetSurfaceTransformsAreAnimating(bool animating) { target_surface_transforms_are_animating_ = animating; - } + } bool target_surface_transforms_are_animating() const { return target_surface_transforms_are_animating_; } @@ -135,5 +135,5 @@ class CC_EXPORT RenderSurface { DISALLOW_COPY_AND_ASSIGN(RenderSurface); }; -} +} // namespace cc #endif // CC_LAYERS_RENDER_SURFACE_H_ diff --git a/cc/layers/render_surface_impl.h b/cc/layers/render_surface_impl.h index 1466bca..5154561 100644 --- a/cc/layers/render_surface_impl.h +++ b/cc/layers/render_surface_impl.h @@ -5,6 +5,9 @@ #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_ #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ +#include <string> +#include <vector> + #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" @@ -167,5 +170,5 @@ class CC_EXPORT RenderSurfaceImpl { DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); }; -} +} // namespace cc #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ diff --git a/cc/layers/scrollbar_geometry_fixed_thumb.h b/cc/layers/scrollbar_geometry_fixed_thumb.h index 983a70c..74135d3 100644 --- a/cc/layers/scrollbar_geometry_fixed_thumb.h +++ b/cc/layers/scrollbar_geometry_fixed_thumb.h @@ -40,6 +40,6 @@ class CC_EXPORT ScrollbarGeometryFixedThumb : public ScrollbarGeometryStub { gfx::Size thumb_size_; }; -} +} // namespace cc #endif // CC_LAYERS_SCROLLBAR_GEOMETRY_FIXED_THUMB_H_ diff --git a/cc/layers/scrollbar_geometry_stub.cc b/cc/layers/scrollbar_geometry_stub.cc index cd2bc07..56682e0 100644 --- a/cc/layers/scrollbar_geometry_stub.cc +++ b/cc/layers/scrollbar_geometry_stub.cc @@ -4,7 +4,7 @@ #include "cc/layers/scrollbar_geometry_stub.h" -#include <cmath> +#include <algorithm> namespace cc { diff --git a/cc/layers/scrollbar_geometry_stub.h b/cc/layers/scrollbar_geometry_stub.h index 7858f9c..04400e7 100644 --- a/cc/layers/scrollbar_geometry_stub.h +++ b/cc/layers/scrollbar_geometry_stub.h @@ -14,8 +14,8 @@ namespace cc { // This subclass wraps an existing scrollbar geometry class so that // another class can derive from it and override specific functions, while // passing through the remaining ones. -class CC_EXPORT ScrollbarGeometryStub : - public NON_EXPORTED_BASE(WebKit::WebScrollbarThemeGeometry) { +class CC_EXPORT ScrollbarGeometryStub + : public NON_EXPORTED_BASE(WebKit::WebScrollbarThemeGeometry) { public: virtual ~ScrollbarGeometryStub(); @@ -61,6 +61,6 @@ class CC_EXPORT ScrollbarGeometryStub : DISALLOW_COPY_AND_ASSIGN(ScrollbarGeometryStub); }; -} +} // namespace cc #endif // CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ diff --git a/cc/layers/scrollbar_layer.cc b/cc/layers/scrollbar_layer.cc index d251d62..c5f15b7 100644 --- a/cc/layers/scrollbar_layer.cc +++ b/cc/layers/scrollbar_layer.cc @@ -193,6 +193,7 @@ class ScrollbarBackgroundPainter : public LayerPainter { painter_->PaintTickmarks(canvas, track_paint_rect); } + private: ScrollbarBackgroundPainter(WebKit::WebScrollbar* scrollbar, ScrollbarThemePainter *painter, diff --git a/cc/layers/scrollbar_layer_impl.h b/cc/layers/scrollbar_layer_impl.h index 23422b3..7cf405b 100644 --- a/cc/layers/scrollbar_layer_impl.h +++ b/cc/layers/scrollbar_layer_impl.h @@ -100,7 +100,6 @@ class CC_EXPORT ScrollbarLayerImpl : public ScrollbarLayerImplBase { private: ScrollbarLayerImpl* owner_; - }; virtual const char* LayerTypeAsString() const OVERRIDE; @@ -146,5 +145,5 @@ class CC_EXPORT ScrollbarLayerImpl : public ScrollbarLayerImplBase { bool is_overlay_scrollbar_; }; -} +} // namespace cc #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ diff --git a/cc/layers/scrollbar_layer_impl_base.h b/cc/layers/scrollbar_layer_impl_base.h index 714c0d7..5257c041 100644 --- a/cc/layers/scrollbar_layer_impl_base.h +++ b/cc/layers/scrollbar_layer_impl_base.h @@ -25,6 +25,6 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl { : LayerImpl(tree_impl, id) {} }; -} // namespace cc +} // namespace cc -#endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ +#endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_ diff --git a/cc/layers/solid_color_layer.h b/cc/layers/solid_color_layer.h index 475f3ed..ae5a592 100644 --- a/cc/layers/solid_color_layer.h +++ b/cc/layers/solid_color_layer.h @@ -29,5 +29,5 @@ class CC_EXPORT SolidColorLayer : public Layer { virtual ~SolidColorLayer(); }; -} +} // namespace cc #endif // CC_LAYERS_SOLID_COLOR_LAYER_H_ diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc index 87c2377..7a796fa 100644 --- a/cc/layers/solid_color_layer_impl.cc +++ b/cc/layers/solid_color_layer_impl.cc @@ -4,6 +4,8 @@ #include "cc/layers/solid_color_layer_impl.h" +#include <algorithm> + #include "cc/layers/quad_sink.h" #include "cc/quads/solid_color_draw_quad.h" diff --git a/cc/layers/solid_color_layer_impl.h b/cc/layers/solid_color_layer_impl.h index db99945..36be2f7 100644 --- a/cc/layers/solid_color_layer_impl.h +++ b/cc/layers/solid_color_layer_impl.h @@ -34,6 +34,6 @@ class CC_EXPORT SolidColorLayerImpl : public LayerImpl { const int tile_size_; }; -} +} // namespace cc #endif // CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h index a957b4c..1e7b31b 100644 --- a/cc/layers/texture_layer.h +++ b/cc/layers/texture_layer.h @@ -102,5 +102,5 @@ class CC_EXPORT TextureLayer : public Layer { DISALLOW_COPY_AND_ASSIGN(TextureLayer); }; -} +} // namespace cc #endif // CC_LAYERS_TEXTURE_LAYER_H_ diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc index 47c92d8..6d20988 100644 --- a/cc/layers/texture_layer_unittest.cc +++ b/cc/layers/texture_layer_unittest.cc @@ -29,7 +29,7 @@ namespace { class MockLayerTreeHost : public LayerTreeHost { public: - MockLayerTreeHost(LayerTreeHostClient* client) + explicit MockLayerTreeHost(LayerTreeHostClient* client) : LayerTreeHost(client, LayerTreeSettings()) { Initialize(scoped_ptr<Thread>(NULL)); } diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc index c4f813a..99b44ce 100644 --- a/cc/layers/tiled_layer.cc +++ b/cc/layers/tiled_layer.cc @@ -4,6 +4,9 @@ #include "cc/layers/tiled_layer.h" +#include <algorithm> +#include <vector> + #include "base/auto_reset.h" #include "base/basictypes.h" #include "build/build_config.h" @@ -554,7 +557,6 @@ void TiledLayer::UpdateTileTextures(gfx::Rect paint_rect, occlusion->overdraw_metrics()-> DidUpload(gfx::Transform(), source_rect, tile->opaque_rect()); } - } } } diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h index 94ebada..e6112d0 100644 --- a/cc/layers/tiled_layer.h +++ b/cc/layers/tiled_layer.h @@ -139,5 +139,6 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer { DISALLOW_COPY_AND_ASSIGN(TiledLayer); }; -} +} // namespace cc + #endif // CC_LAYERS_TILED_LAYER_H_ diff --git a/cc/layers/tiled_layer_impl.h b/cc/layers/tiled_layer_impl.h index ec0c484..0a8b4c8 100644 --- a/cc/layers/tiled_layer_impl.h +++ b/cc/layers/tiled_layer_impl.h @@ -5,6 +5,8 @@ #ifndef CC_LAYERS_TILED_LAYER_IMPL_H_ #define CC_LAYERS_TILED_LAYER_IMPL_H_ +#include <string> + #include "cc/base/cc_export.h" #include "cc/layers/layer_impl.h" diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc index e9d3a78..dd6c06e 100644 --- a/cc/layers/tiled_layer_unittest.cc +++ b/cc/layers/tiled_layer_unittest.cc @@ -4,6 +4,9 @@ #include "cc/layers/tiled_layer.h" +#include <limits> +#include <vector> + #include "cc/debug/overdraw_metrics.h" #include "cc/resources/bitmap_content_layer_updater.h" #include "cc/resources/layer_painter.h" @@ -1186,7 +1189,6 @@ TEST_F(TiledLayerTest, TilesPaintedWithOcclusionAndVisiblityConstraints) { 210000 + 180000 + 180000, 1); EXPECT_EQ(3 + 6 + 6, occluded.overdraw_metrics()->tiles_culled_for_upload()); - } TEST_F(TiledLayerTest, TilesNotPaintedWithoutInvalidation) { diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h index d59dbe2..784d951 100644 --- a/cc/layers/video_frame_provider.h +++ b/cc/layers/video_frame_provider.h @@ -35,6 +35,9 @@ class VideoFrameProvider { // Notifies the provider's client of a new UV transform matrix to be used. virtual void DidUpdateMatrix(const float* matrix) = 0; + + protected: + virtual ~Client() {} }; // May be called from any thread, but there must be some external guarantee diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc index 4cbdf3c..94125d6 100644 --- a/cc/layers/video_layer_impl.cc +++ b/cc/layers/video_layer_impl.cc @@ -452,7 +452,8 @@ void VideoLayerImpl::FreeFramePlanes(ResourceProvider* resource_provider) { frame_planes_[i].FreeData(resource_provider); } -void VideoLayerImpl::FreeUnusedFramePlanes(ResourceProvider* resource_provider) { +void VideoLayerImpl::FreeUnusedFramePlanes( + ResourceProvider* resource_provider) { size_t first_unused_plane = (frame_ ? media::VideoFrame::NumPlanes(format_) : 0); for (size_t i = first_unused_plane; i < media::VideoFrame::kMaxPlanes; ++i) diff --git a/cc/output/delegating_renderer_unittest.cc b/cc/output/delegating_renderer_unittest.cc index c0b8dff..988ab3c 100644 --- a/cc/output/delegating_renderer_unittest.cc +++ b/cc/output/delegating_renderer_unittest.cc @@ -96,7 +96,7 @@ class DelegatingRendererTestResources : public DelegatingRendererTest { frame->render_passes_by_id.clear(); TestRenderPass* child_pass = AddRenderPass( - frame->render_passes, + &frame->render_passes, RenderPass::Id(2, 1), gfx::Rect(3, 3, 10, 10), gfx::Transform()); @@ -104,7 +104,7 @@ class DelegatingRendererTestResources : public DelegatingRendererTest { host_impl->resource_provider(), RenderPass::Id(0, 0)); TestRenderPass* pass = AddRenderPass( - frame->render_passes, + &frame->render_passes, RenderPass::Id(1, 1), gfx::Rect(3, 3, 10, 10), gfx::Transform()); diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc index 8ebcd4d..21a00d0 100644 --- a/cc/output/gl_renderer_unittest.cc +++ b/cc/output/gl_renderer_unittest.cc @@ -813,12 +813,12 @@ TEST(GLRendererTest2, ShouldClearRootRenderPass) { RenderPass::Id root_pass_id(1, 0); TestRenderPass* root_pass = AddRenderPass( - render_passes, root_pass_id, viewport_rect, gfx::Transform()); + &render_passes, root_pass_id, viewport_rect, gfx::Transform()); AddQuad(root_pass, viewport_rect, SK_ColorGREEN); RenderPass::Id child_pass_id(2, 0); TestRenderPass* child_pass = AddRenderPass( - render_passes, child_pass_id, viewport_rect, gfx::Transform()); + &render_passes, child_pass_id, viewport_rect, gfx::Transform()); AddQuad(child_pass, viewport_rect, SK_ColorBLUE); AddRenderPassQuad(root_pass, child_pass); @@ -885,18 +885,18 @@ TEST(GLRendererTest2, ScissorTestWhenClearing) { gfx::Rect grand_child_rect(25, 25); RenderPass::Id grand_child_pass_id(3, 0); TestRenderPass* grand_child_pass = AddRenderPass( - render_passes, grand_child_pass_id, grand_child_rect, gfx::Transform()); + & render_passes, grand_child_pass_id, grand_child_rect, gfx::Transform()); AddClippedQuad(grand_child_pass, grand_child_rect, SK_ColorYELLOW); gfx::Rect child_rect(50, 50); RenderPass::Id child_pass_id(2, 0); TestRenderPass* child_pass = - AddRenderPass(render_passes, child_pass_id, child_rect, gfx::Transform()); + AddRenderPass(&render_passes, child_pass_id, child_rect, gfx::Transform()); AddQuad(child_pass, child_rect, SK_ColorBLUE); RenderPass::Id root_pass_id(1, 0); TestRenderPass* root_pass = AddRenderPass( - render_passes, root_pass_id, viewport_rect, gfx::Transform()); + & render_passes, root_pass_id, viewport_rect, gfx::Transform()); AddQuad(root_pass, viewport_rect, SK_ColorGREEN); AddRenderPassQuad(root_pass, child_pass); @@ -965,7 +965,7 @@ class MockOutputSurfaceTest : public testing::Test, public FakeRendererClient { RenderPass::Id render_pass_id(1, 0); TestRenderPass* render_pass = AddRenderPass( - *render_passes, render_pass_id, viewport_rect, gfx::Transform()); + render_passes, render_pass_id, viewport_rect, gfx::Transform()); AddQuad(render_pass, viewport_rect, SK_ColorGREEN); EXPECT_CALL(output_surface_, EnsureBackbuffer()).WillRepeatedly(Return()); diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc index 259805f..ae524dc 100644 --- a/cc/output/software_renderer_unittest.cc +++ b/cc/output/software_renderer_unittest.cc @@ -218,7 +218,7 @@ TEST_F(SoftwareRendererTest, ShouldClearRootRenderPass) { // Draw a fullscreen green quad in a first frame. RenderPass::Id root_clear_pass_id(1, 0); TestRenderPass* root_clear_pass = - AddRenderPass(list, root_clear_pass_id, viewport_rect, gfx::Transform()); + AddRenderPass(&list, root_clear_pass_id, viewport_rect, gfx::Transform()); AddQuad(root_clear_pass, viewport_rect, SK_ColorGREEN); renderer()->DecideRenderPassAllocationsForFrame(list); @@ -236,7 +236,7 @@ TEST_F(SoftwareRendererTest, ShouldClearRootRenderPass) { RenderPass::Id root_smaller_pass_id(2, 0); TestRenderPass* root_smaller_pass = AddRenderPass( - list, root_smaller_pass_id, viewport_rect, gfx::Transform()); + &list, root_smaller_pass_id, viewport_rect, gfx::Transform()); AddQuad(root_smaller_pass, smaller_rect, SK_ColorMAGENTA); renderer()->DecideRenderPassAllocationsForFrame(list); diff --git a/cc/scheduler/delay_based_time_source_unittest.cc b/cc/scheduler/delay_based_time_source_unittest.cc index a4493a5..c368195 100644 --- a/cc/scheduler/delay_based_time_source_unittest.cc +++ b/cc/scheduler/delay_based_time_source_unittest.cc @@ -4,6 +4,7 @@ #include "cc/scheduler/delay_based_time_source.h" +#include "base/basictypes.h" #include "cc/base/thread.h" #include "cc/test/scheduler_test_common.h" #include "testing/gtest/include/gtest/gtest.h" @@ -303,7 +304,7 @@ TEST(DelayBasedTimeSourceTest, AchievesTargetRateWithNoNoise) { double total_frame_time = 0.0; for (int i = 0; i < num_iterations; ++i) { - long long delay_ms = thread.PendingDelayMs(); + int64 delay_ms = thread.PendingDelayMs(); // accumulate the "delay" total_frame_time += delay_ms / 1000.0; diff --git a/cc/scheduler/rate_limiter.h b/cc/scheduler/rate_limiter.h index 522528f..0d2de38 100644 --- a/cc/scheduler/rate_limiter.h +++ b/cc/scheduler/rate_limiter.h @@ -16,6 +16,9 @@ class Thread; class RateLimiterClient { public: virtual void RateLimit() = 0; + + protected: + virtual ~RateLimiterClient() {} }; // A RateLimiter can be used to make sure that a single context does not @@ -53,5 +56,6 @@ class RateLimiter : public base::RefCounted<RateLimiter> { DISALLOW_COPY_AND_ASSIGN(RateLimiter); }; -} +} // namespace cc + #endif // CC_SCHEDULER_RATE_LIMITER_H_ diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h index 63463db..4c342af 100644 --- a/cc/scheduler/scheduler_state_machine.h +++ b/cc/scheduler/scheduler_state_machine.h @@ -27,7 +27,7 @@ namespace cc { class CC_EXPORT SchedulerStateMachine { public: // settings must be valid for the lifetime of this class. - SchedulerStateMachine(const SchedulerSettings& settings); + explicit SchedulerStateMachine(const SchedulerSettings& settings); enum CommitState { COMMIT_STATE_IDLE, diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc index f15bb8f..93fc82f 100644 --- a/cc/scheduler/scheduler_state_machine_unittest.cc +++ b/cc/scheduler/scheduler_state_machine_unittest.cc @@ -21,7 +21,7 @@ const SchedulerStateMachine::CommitState all_commit_states[] = { // Exposes the protected state fields of the SchedulerStateMachine for testing class StateMachine : public SchedulerStateMachine { public: - StateMachine(const SchedulerSettings& scheduler_settings) + explicit StateMachine(const SchedulerSettings& scheduler_settings) : SchedulerStateMachine(scheduler_settings) {} void SetCommitState(CommitState cs) { commit_state_ = cs; } CommitState CommitState() const { return commit_state_; } diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc index f47a872..a2c968c 100644 --- a/cc/scheduler/scheduler_unittest.cc +++ b/cc/scheduler/scheduler_unittest.cc @@ -4,6 +4,8 @@ #include "cc/scheduler/scheduler.h" +#include <vector> + #include "base/logging.h" #include "cc/test/scheduler_test_common.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/cc/scheduler/texture_uploader_unittest.cc b/cc/scheduler/texture_uploader_unittest.cc index edb7e09..d5c8e49 100644 --- a/cc/scheduler/texture_uploader_unittest.cc +++ b/cc/scheduler/texture_uploader_unittest.cc @@ -12,7 +12,11 @@ #include "third_party/khronos/GLES2/gl2.h" #include "third_party/khronos/GLES2/gl2ext.h" -using namespace WebKit; +using WebKit::WGC3Denum; +using WebKit::WGC3Dint; +using WebKit::WGC3Dsizei; +using WebKit::WebGLId; +using WebKit::WGC3Duint; namespace cc { namespace { diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h index 8cb4d9a..4e5752c 100644 --- a/cc/test/animation_test_common.h +++ b/cc/test/animation_test_common.h @@ -33,7 +33,7 @@ class FakeFloatAnimationCurve : public FloatAnimationCurve { class FakeTransformTransition : public TransformAnimationCurve { public: - FakeTransformTransition(double duration); + explicit FakeTransformTransition(double duration); virtual ~FakeTransformTransition(); virtual double Duration() const OVERRIDE; diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h index 240b450..710615b 100644 --- a/cc/test/fake_layer_tree_host_client.h +++ b/cc/test/fake_layer_tree_host_client.h @@ -21,7 +21,7 @@ class FakeLayerTreeHostClient : public LayerTreeHostClient { DELEGATED_3D, DELEGATED_SOFTWARE }; - FakeLayerTreeHostClient(RendererOptions options); + explicit FakeLayerTreeHostClient(RendererOptions options); virtual ~FakeLayerTreeHostClient(); virtual void WillBeginFrame() OVERRIDE {} diff --git a/cc/test/fake_layer_tree_host_impl.h b/cc/test/fake_layer_tree_host_impl.h index 8ed07e8..d46c625 100644 --- a/cc/test/fake_layer_tree_host_impl.h +++ b/cc/test/fake_layer_tree_host_impl.h @@ -14,7 +14,7 @@ namespace cc { class FakeLayerTreeHostImpl : public LayerTreeHostImpl { public: - FakeLayerTreeHostImpl(Proxy* proxy); + explicit FakeLayerTreeHostImpl(Proxy* proxy); FakeLayerTreeHostImpl(const LayerTreeSettings& settings, Proxy* proxy); virtual ~FakeLayerTreeHostImpl(); diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h index 64c99ae..8a2217b 100644 --- a/cc/test/fake_output_surface.h +++ b/cc/test/fake_output_surface.h @@ -55,8 +55,8 @@ class FakeOutputSurface : public OutputSurface { new FakeOutputSurface(software_device.Pass(), true)); } - virtual bool BindToClient(OutputSurfaceClient*) OVERRIDE; - virtual void SendFrameToParentCompositor(CompositorFrame*) OVERRIDE; + virtual bool BindToClient(OutputSurfaceClient* client) OVERRIDE; + virtual void SendFrameToParentCompositor(CompositorFrame* frame) OVERRIDE; CompositorFrame& last_sent_frame() { return last_sent_frame_; } size_t num_sent_frames() { return num_sent_frames_; } diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc index e837846..9bdd3f8 100644 --- a/cc/test/fake_picture_layer_tiling_client.cc +++ b/cc/test/fake_picture_layer_tiling_client.cc @@ -4,6 +4,8 @@ #include "cc/test/fake_picture_layer_tiling_client.h" +#include <limits> + namespace cc { class FakeInfinitePicturePileImpl : public PicturePileImpl { diff --git a/cc/test/fake_scrollbar_theme_painter.h b/cc/test/fake_scrollbar_theme_painter.h index 9c44a38..47f1251 100644 --- a/cc/test/fake_scrollbar_theme_painter.h +++ b/cc/test/fake_scrollbar_theme_painter.h @@ -48,4 +48,4 @@ class FakeScrollbarThemePainter : public ScrollbarThemePainter { } // namespace cc -#endif // CC_TEST_FAKE_SCROLLBAR_BACKGROUND_PAINTER_H_ +#endif // CC_TEST_FAKE_SCROLLBAR_THEME_PAINTER_H_ diff --git a/cc/test/fake_web_scrollbar.h b/cc/test/fake_web_scrollbar.h index 331f715..881cf3d 100644 --- a/cc/test/fake_web_scrollbar.h +++ b/cc/test/fake_web_scrollbar.h @@ -6,7 +6,7 @@ #define CC_TEST_FAKE_WEB_SCROLLBAR_H_ #include "base/memory/scoped_ptr.h" -#include <public/WebScrollbar.h> +#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" namespace cc { diff --git a/cc/test/fake_web_scrollbar_theme_geometry.h b/cc/test/fake_web_scrollbar_theme_geometry.h index 0c38333..dc814ed 100644 --- a/cc/test/fake_web_scrollbar_theme_geometry.h +++ b/cc/test/fake_web_scrollbar_theme_geometry.h @@ -47,7 +47,8 @@ class FakeWebScrollbarThemeGeometry : public WebKit::WebScrollbarThemeGeometry { WebKit::WebRect& end_track) OVERRIDE; protected: - FakeWebScrollbarThemeGeometry(bool has_thumb) : has_thumb_(has_thumb) {} + explicit FakeWebScrollbarThemeGeometry(bool has_thumb) + : has_thumb_(has_thumb) {} bool has_thumb_; }; diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index 79a0d39..bb8e64e 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -64,7 +64,7 @@ void LayerTreePixelTest::SwapBuffersOnThread(LayerTreeHostImpl* host_impl, EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)); // To rebaseline: - //EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_))); + // EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_))); EXPECT_TRUE(IsSameAsPNGFile(bitmap, test_data_dir.Append(ref_file_))); diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 5170f85..e865d29 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -22,12 +22,8 @@ #include "cc/trees/layer_tree_host_impl.h" #include "cc/trees/single_thread_proxy.h" #include "testing/gmock/include/gmock/gmock.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperation.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations.h" #include "ui/gfx/size_conversions.h" -using namespace WebKit; - namespace cc { TestHooks::TestHooks() { @@ -448,7 +444,7 @@ void LayerTreeTest::RealEndTest() { base::Bind(&LayerTreeTest::RealEndTest, main_thread_weak_ptr_)); return; } - + MessageLoop::current()->Quit(); } diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index 7f76d739f..eb5b159 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_ -#define CC_TEST_LAYER_TREE_TEST_COMMON_H_ +#ifndef CC_TEST_LAYER_TREE_TEST_H_ +#define CC_TEST_LAYER_TREE_TEST_H_ #include "base/memory/ref_counted.h" #include "base/threading/thread.h" @@ -181,4 +181,4 @@ class LayerTreeTest : public testing::Test, public TestHooks { SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) -#endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ +#endif // CC_TEST_LAYER_TREE_TEST_H_ diff --git a/cc/test/occlusion_tracker_test_common.h b/cc/test/occlusion_tracker_test_common.h index 6d16df0..af8ed3c 100644 --- a/cc/test/occlusion_tracker_test_common.h +++ b/cc/test/occlusion_tracker_test_common.h @@ -13,8 +13,8 @@ namespace cc { // A subclass to expose the total current occlusion. template <typename LayerType, typename RenderSurfaceType> -class TestOcclusionTrackerBase : - public OcclusionTrackerBase<LayerType, RenderSurfaceType> { +class TestOcclusionTrackerBase + : public OcclusionTrackerBase<LayerType, RenderSurfaceType> { public: TestOcclusionTrackerBase(gfx::Rect screen_scissor_rect, bool record_metrics_for_frame) diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 562dbeb..4b44ecb 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -20,7 +20,7 @@ namespace cc { class PixelTest::PixelTestRendererClient : public RendererClient { public: - PixelTestRendererClient(gfx::Size device_viewport_size) + explicit PixelTestRendererClient(gfx::Size device_viewport_size) : device_viewport_size_(device_viewport_size) {} // RendererClient implementation. @@ -91,7 +91,7 @@ bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file) { return false; // To rebaseline: - //return WritePNGFile(bitmap, test_data_dir.Append(ref_file)); + // return WritePNGFile(bitmap, test_data_dir.Append(ref_file)); return IsSameAsPNGFile(bitmap, test_data_dir.Append(ref_file)); } diff --git a/cc/test/pixel_test_utils.cc b/cc/test/pixel_test_utils.cc index d1101b3..ead2f6f 100644 --- a/cc/test/pixel_test_utils.cc +++ b/cc/test/pixel_test_utils.cc @@ -4,6 +4,9 @@ #include "cc/test/pixel_test_utils.h" +#include <string> +#include <vector> + #include "base/file_util.h" #include "base/logging.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index e9614c4..94d0f64 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -15,14 +15,14 @@ namespace cc { -TestRenderPass* AddRenderPass(RenderPassList& pass_list, +TestRenderPass* AddRenderPass(RenderPassList* pass_list, RenderPass::Id id, gfx::Rect output_rect, const gfx::Transform& root_transform) { scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); pass->SetNew(id, output_rect, output_rect, root_transform); TestRenderPass* saved = pass.get(); - pass_list.push_back(pass.PassAs<RenderPass>()); + pass_list->push_back(pass.PassAs<RenderPass>()); return saved; } diff --git a/cc/test/render_pass_test_utils.h b/cc/test/render_pass_test_utils.h index 5c2f676..83e5d90 100644 --- a/cc/test/render_pass_test_utils.h +++ b/cc/test/render_pass_test_utils.h @@ -22,7 +22,7 @@ class TestRenderPass; // Adds a new render pass with the provided properties to the given // render pass list. TestRenderPass* AddRenderPass( - RenderPassList& pass_list, + RenderPassList* pass_list, RenderPass::Id id, gfx::Rect output_rect, const gfx::Transform& root_transform); diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h index 521def9..b3b2c2d 100644 --- a/cc/test/scheduler_test_common.h +++ b/cc/test/scheduler_test_common.h @@ -5,6 +5,7 @@ #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_ #define CC_TEST_SCHEDULER_TEST_COMMON_H_ +#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" #include "cc/base/thread.h" @@ -45,7 +46,7 @@ class FakeThread : public cc::Thread { bool HasPendingTask() const { return pending_task_; } void RunPendingTask(); - long long PendingDelayMs() const { + int64 PendingDelayMs() const { EXPECT_TRUE(HasPendingTask()); return pending_task_delay_; } @@ -57,7 +58,7 @@ class FakeThread : public cc::Thread { protected: scoped_ptr<base::Closure> pending_task_; - long long pending_task_delay_; + int64 pending_task_delay_; bool run_pending_task_on_overwrite_; }; @@ -111,7 +112,7 @@ class FakeDelayBasedTimeSource : public cc::DelayBasedTimeSource { class FakeFrameRateController : public cc::FrameRateController { public: - FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) + explicit FakeFrameRateController(scoped_refptr<cc::TimeSource> timer) : cc::FrameRateController(timer) {} int NumFramesPending() const { return num_frames_pending_; } diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc index e09a866..0663f77 100644 --- a/cc/test/test_web_graphics_context_3d.cc +++ b/cc/test/test_web_graphics_context_3d.cc @@ -254,7 +254,7 @@ void TestWebGraphicsContext3D::bindRenderbuffer( WGC3Denum target, WebGLId renderbuffer) { if (!renderbuffer) return; - EXPECT_EQ(kRenderbufferId | context_id_ << 16, renderbuffer); + EXPECT_EQ(kRenderbufferId | context_id_ << 16, renderbuffer); } void TestWebGraphicsContext3D::bindTexture( diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc index 698f9643..e8343e7 100644 --- a/cc/trees/damage_tracker.cc +++ b/cc/trees/damage_tracker.cc @@ -4,6 +4,8 @@ #include "cc/trees/damage_tracker.h" +#include <algorithm> + #include "cc/base/math_util.h" #include "cc/layers/layer_impl.h" #include "cc/layers/render_surface_impl.h" @@ -239,7 +241,7 @@ gfx::RectF DamageTracker::TrackDamageFromLeftoverRects() { static bool LayerNeedsToRedrawOntoItsTargetSurface(LayerImpl* layer) { // If the layer does NOT own a surface but has SurfacePropertyChanged, // this means that its target surface is affected and needs to be redrawn. - // However, if the layer DOES own a surface, then the SurfacePropertyChanged + // However, if the layer DOES own a surface, then the SurfacePropertyChanged // flag should not be used here, because that flag represents whether the // layer's surface has changed. if (layer->render_surface()) diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc index 164ebe1..95d02e8 100644 --- a/cc/trees/damage_tracker_unittest.cc +++ b/cc/trees/damage_tracker_unittest.cc @@ -17,7 +17,8 @@ #include "third_party/skia/include/effects/SkBlurImageFilter.h" #include "ui/gfx/quad_f.h" -using namespace WebKit; +using WebKit::WebFilterOperation; +using WebKit::WebFilterOperations; namespace cc { namespace { diff --git a/cc/trees/layer_sorter.cc b/cc/trees/layer_sorter.cc index ffeb04a..235397b 100644 --- a/cc/trees/layer_sorter.cc +++ b/cc/trees/layer_sorter.cc @@ -254,7 +254,7 @@ float LayerShape::LayerZFromProjectedPoint(gfx::PointF p) const { return 0.f; // The intersection point would be given by: - // p + (n / d) * u but since we are only interested in the + // p + (n / d) * u but since we are only interested in the // z coordinate and p's z coord is zero, all we need is the value of n/d. return n / d; } @@ -391,7 +391,6 @@ void LayerSorter::Sort(LayerList::iterator first, LayerList::iterator last) { DVLOG(2) << "Sorted list: "; while (active_edges_.size() || no_incoming_edge_node_list.size()) { while (no_incoming_edge_node_list.size()) { - // It is necessary to preserve the existing ordering of layers, when there // are no explicit dependencies (because this existing ordering has // correct z-index/layout ordering). To preserve this ordering, we process diff --git a/cc/trees/layer_sorter.h b/cc/trees/layer_sorter.h index a1a00dd..5577ad7 100644 --- a/cc/trees/layer_sorter.h +++ b/cc/trees/layer_sorter.h @@ -5,6 +5,8 @@ #ifndef CC_TREES_LAYER_SORTER_H_ #define CC_TREES_LAYER_SORTER_H_ +#include <vector> + #include "base/basictypes.h" #include "base/hash_tables.h" #include "cc/base/cc_export.h" @@ -109,5 +111,5 @@ class CC_EXPORT LayerSorter { DISALLOW_COPY_AND_ASSIGN(LayerSorter); }; -} +} // namespace cc #endif // CC_TREES_LAYER_SORTER_H_ diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 61c9e36..bbd2259 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h @@ -6,6 +6,7 @@ #define CC_TREES_LAYER_TREE_HOST_H_ #include <limits> +#include <vector> #include "base/basictypes.h" #include "base/cancelable_callback.h" @@ -77,7 +78,7 @@ struct CC_EXPORT RendererCapabilities { bool avoid_pow2_textures; }; -class CC_EXPORT LayerTreeHost : public RateLimiterClient { +class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { public: static scoped_ptr<LayerTreeHost> Create(LayerTreeHostClient* client, const LayerTreeSettings& settings, @@ -262,7 +263,7 @@ class CC_EXPORT LayerTreeHost : public RateLimiterClient { void TriggerPrepaint(); void PrioritizeTextures(const LayerList& render_surface_layer_list, - OverdrawMetrics* metrics); + OverdrawMetrics* metrics); void SetPrioritiesForSurfaces(size_t surface_memory_bytes); void SetPrioritiesForLayers(const LayerList& update_list); size_t CalculateMemoryForRenderSurfaces(const LayerList& update_list); diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h index 547c442..4bc913c 100644 --- a/cc/trees/layer_tree_host_client.h +++ b/cc/trees/layer_tree_host_client.h @@ -52,6 +52,6 @@ class LayerTreeHostClient { virtual ~LayerTreeHostClient() {} }; -} +} // namespace cc #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc index 1501b0e..ddad541 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -178,7 +178,6 @@ static gfx::Rect CalculateVisibleContentRect( static inline bool TransformToParentIsKnown(LayerImpl* layer) { return true; } static inline bool TransformToParentIsKnown(Layer* layer) { - return !layer->TransformIsAnimating(); } @@ -766,8 +765,8 @@ static void CalculateDrawPropertiesInternal( // Tr[replica] * Tr[origin2anchor].inverse() // - // If we early-exit anywhere in this function, the drawable_content_rect of this - // subtree should be considered empty. + // If we early-exit anywhere in this function, the drawable_content_rect of + // this subtree should be considered empty. *drawable_content_rect_of_subtree = gfx::Rect(); // The root layer cannot skip CalcDrawProperties. diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h index 84ad8c1..16bd192 100644 --- a/cc/trees/layer_tree_host_common.h +++ b/cc/trees/layer_tree_host_common.h @@ -5,6 +5,8 @@ #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_ #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ +#include <vector> + #include "base/memory/ref_counted.h" #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index d8eecb6..11a6307 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -371,7 +371,7 @@ void LayerTreeHostImpl::TrackDamageForAllSurfaces( // surface. for (int surface_index = render_surface_layer_list.size() - 1; - surface_index >= 0 ; + surface_index >= 0; --surface_index) { LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); @@ -506,12 +506,11 @@ bool LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) { TRACE_EVENT1("cc", "LayerTreeHostImpl::CalculateRenderPasses", "render_surface_layer_list.size()", - static_cast<long long unsigned>( - frame->render_surface_layer_list->size())); + static_cast<uint64>(frame->render_surface_layer_list->size())); // Create the render passes in dependency order. for (int surface_index = frame->render_surface_layer_list->size() - 1; - surface_index >= 0 ; + surface_index >= 0; --surface_index) { LayerImpl* render_surface_layer = (*frame->render_surface_layer_list)[surface_index]; @@ -668,7 +667,8 @@ bool LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) { RemoveRenderPasses(CullRenderPassesWithNoQuads(), frame); renderer_->DecideRenderPassAllocationsForFrame(frame->render_passes); - RemoveRenderPasses(CullRenderPassesWithCachedTextures(*renderer_), frame); + RemoveRenderPasses(CullRenderPassesWithCachedTextures(renderer_.get()), + frame); return draw_frame; } @@ -735,7 +735,7 @@ bool LayerTreeHostImpl::CullRenderPassesWithCachedTextures:: const FrameData& frame) const { bool quad_has_damage = !quad.contents_changed_since_last_frame.IsEmpty(); bool quad_has_cached_resource = - renderer_.HaveCachedResourcesForRenderPassId(quad.render_pass_id); + renderer_->HaveCachedResourcesForRenderPassId(quad.render_pass_id); if (quad_has_damage) { TRACE_EVENT0("cc", "CullRenderPassesWithCachedTextures have damage"); return false; diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index 081a1e1..6ef2f64 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h @@ -5,6 +5,9 @@ #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ +#include <string> +#include <vector> + #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" @@ -66,6 +69,9 @@ class LayerTreeHostImplClient { virtual bool IsInsideDraw() = 0; virtual void RenewTreePriority() = 0; virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; + + protected: + virtual ~LayerTreeHostImplClient() {} }; // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering @@ -294,10 +300,10 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, size_t RenderPassListEnd(const RenderPassList& list) const { return 0 - 1; } size_t RenderPassListNext(size_t it) const { return it - 1; } - CullRenderPassesWithCachedTextures(Renderer& renderer) + explicit CullRenderPassesWithCachedTextures(Renderer* renderer) : renderer_(renderer) {} private: - Renderer& renderer_; + Renderer* renderer_; }; class CC_EXPORT CullRenderPassesWithNoQuads { diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index f09b31a..e47e311 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -994,11 +994,11 @@ class DidDrawCheckLayer : public TiledLayerImpl { return scoped_ptr<LayerImpl>(new DidDrawCheckLayer(tree_impl, id)); } - virtual void DidDraw(ResourceProvider*) OVERRIDE { + virtual void DidDraw(ResourceProvider* provider) OVERRIDE { did_draw_called_ = true; } - virtual void WillDraw(ResourceProvider*) OVERRIDE { + virtual void WillDraw(ResourceProvider* provider) OVERRIDE { will_draw_called_ = true; } @@ -2318,7 +2318,6 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) { host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); EXPECT_TRUE(layer1->quads_appended()); host_impl_->DidDrawAllLayers(frame); - } TEST_F(LayerTreeHostImplTest, ViewportCovered) { @@ -2413,7 +2412,6 @@ TEST_F(LayerTreeHostImplTest, ViewportCovered) { frame.render_passes[0]->quad_list, gfx::Rect(viewport_size)); host_impl_->DidDrawAllLayers(frame); } - } @@ -2654,8 +2652,9 @@ class MockContext : public TestWebGraphicsContext3D { class MockContextHarness { private: MockContext* context_; + public: - MockContextHarness(MockContext* context) + explicit MockContextHarness(MockContext* context) : context_(context) { // Catch "uninteresting" calls EXPECT_CALL(*context_, useProgram(_)) @@ -2701,7 +2700,6 @@ class MockContextHarness { EXPECT_CALL(*context_, useProgram(_)) .WillOnce(Return()) .RetiresOnSaturation(); - } void MustSetScissor(int x, int y, int width, int height) { @@ -3282,7 +3280,6 @@ TEST_F(LayerTreeHostImplTest, TextureCachingWithOcclusion) { my_host_impl->DrawLayers(&frame, base::TimeTicks::Now()); my_host_impl->DidDrawAllLayers(frame); } - } TEST_F(LayerTreeHostImplTest, TextureCachingWithOcclusionEarlyOut) { @@ -4584,8 +4581,9 @@ TestCase remove_render_passes_cases[] = { } }; -static void VerifyRenderPassTestData(TestCase& test_case, - RenderPassRemovalTestData& test_data) { +static void VerifyRenderPassTestData( + const TestCase& test_case, + const RenderPassRemovalTestData& test_data) { char actual_result[1024]; DumpRenderPassTestData(test_data, actual_result); EXPECT_STREQ(test_case.expected_result, actual_result) << "In test case: " << @@ -4611,7 +4609,7 @@ TEST_F(LayerTreeHostImplTest, TestRemoveRenderPasses) { test_data, renderer.get()); LayerTreeHostImpl::RemoveRenderPasses( - LayerTreeHostImpl::CullRenderPassesWithCachedTextures(*renderer), + LayerTreeHostImpl::CullRenderPassesWithCachedTextures(renderer.get()), &test_data); VerifyRenderPassTestData(remove_render_passes_cases[test_case_index], test_data); diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index d9a15ba..246af1f 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc @@ -26,8 +26,8 @@ class LayerTreeHostAnimationTest : public LayerTreeTest { // Makes sure that SetNeedsAnimate does not cause the CommitRequested() state to // be set. -class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested() : num_commits_(0) {} @@ -77,8 +77,8 @@ MULTI_THREAD_TEST_F( // animate gets called yet-again, indicating that the proxy is correctly // handling the case where SetNeedsAnimate() is called inside the begin frame // flow. -class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() : num_animates_(0) {} @@ -108,8 +108,8 @@ MULTI_THREAD_TEST_F( // Add a layer animation and confirm that // LayerTreeHostImpl::updateAnimationState does get called and continues to // get called. -class LayerTreeHostAnimationTestAddAnimation : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestAddAnimation + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestAddAnimation() : num_animates_(0) @@ -159,8 +159,8 @@ MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestAddAnimation) // Add a layer animation to a layer, but continually fail to draw. Confirm that // after a while, we do eventually force a draw. -class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws() : started_animating_(false) {} @@ -175,7 +175,7 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws : started_animating_ = true; } - virtual void DrawLayersOnThread(LayerTreeHostImpl*) OVERRIDE { + virtual void DrawLayersOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { if (started_animating_) EndTest(); } @@ -197,8 +197,8 @@ class LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws : MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws) // Ensures that animations continue to be ticked when we are backgrounded. -class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestTickAnimationWhileBackgrounded() : num_animates_(0) {} @@ -235,8 +235,8 @@ SINGLE_AND_MULTI_THREAD_TEST_F( LayerTreeHostAnimationTestTickAnimationWhileBackgrounded) // Ensures that animations continue to be ticked when we are backgrounded. -class LayerTreeHostAnimationTestAddAnimationWithTimingFunction : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestAddAnimationWithTimingFunction + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestAddAnimationWithTimingFunction() {} @@ -284,8 +284,8 @@ SINGLE_AND_MULTI_THREAD_TEST_F( // Ensures that main thread animations have their start times synchronized with // impl thread animations. -class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestSynchronizeAnimationStartTimes() : main_start_time_(-1.0), @@ -337,8 +337,8 @@ SINGLE_AND_MULTI_THREAD_TEST_F( LayerTreeHostAnimationTestSynchronizeAnimationStartTimes) // Ensures that notify animation finished is called. -class LayerTreeHostAnimationTestAnimationFinishedEvents : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestAnimationFinishedEvents + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestAnimationFinishedEvents() {} @@ -364,8 +364,8 @@ SINGLE_AND_MULTI_THREAD_TEST_F( // Ensures that when opacity is being animated, this value does not cause the // subtree to be skipped. -class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity() : update_check_layer_(FakeContentLayer::Create(&client_)) { @@ -381,7 +381,7 @@ class LayerTreeHostAnimationTestDoNotSkipLayersWithAnimatedOpacity : PostAddAnimationToMainThread(update_check_layer_.get()); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl*) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { EndTest(); } @@ -404,8 +404,8 @@ MULTI_THREAD_TEST_F( // Layers added to tree with existing active animations should have the // animation correctly recognized. -class LayerTreeHostAnimationTestLayerAddedWithAnimation : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestLayerAddedWithAnimation + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestLayerAddedWithAnimation() {} @@ -442,8 +442,8 @@ class LayerTreeHostAnimationTestLayerAddedWithAnimation : SINGLE_AND_MULTI_THREAD_TEST_F( LayerTreeHostAnimationTestLayerAddedWithAnimation) -class LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount() : animated_commit_(-1) { @@ -492,8 +492,8 @@ class LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount : MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCompositeAndReadbackAnimateCount) -class LayerTreeHostAnimationTestContinuousAnimate : - public LayerTreeHostAnimationTest { +class LayerTreeHostAnimationTestContinuousAnimate + : public LayerTreeHostAnimationTest { public: LayerTreeHostAnimationTestContinuousAnimate() : num_commit_complete_(0), @@ -514,7 +514,7 @@ class LayerTreeHostAnimationTestContinuousAnimate : layer_tree_host()->root_layer()->SetNeedsDisplay(); } - virtual void CommitCompleteOnThread(LayerTreeHostImpl*) OVERRIDE { + virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { if (num_draw_layers_ == 1) num_commit_complete_++; } diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc index 02e59c8..ca44bd6 100644 --- a/cc/trees/layer_tree_host_unittest_delegated.cc +++ b/cc/trees/layer_tree_host_unittest_delegated.cc @@ -114,14 +114,17 @@ class LayerTreeHostDelegatedTestCreateChildId FakeDelegatedRendererLayerImpl* delegated_impl = static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]); + WebKit::WebGraphicsContext3D* context = + host_impl->resource_provider()->GraphicsContext3D(); + ++num_activates_; - switch(num_activates_) { + switch (num_activates_) { case 2: EXPECT_TRUE(delegated_impl->ChildId()); EXPECT_FALSE(did_reset_child_id_); - host_impl->resource_provider()->GraphicsContext3D()->loseContextCHROMIUM( - GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); + context->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, + GL_INNOCENT_CONTEXT_RESET_ARB); break; case 3: EXPECT_TRUE(delegated_impl->ChildId()); diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc index 14b225f..6a6fcff 100644 --- a/cc/trees/layer_tree_host_unittest_scroll.cc +++ b/cc/trees/layer_tree_host_unittest_scroll.cc @@ -38,9 +38,9 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { virtual void Layout() OVERRIDE { Layer* root = layer_tree_host()->root_layer(); - if (!layer_tree_host()->commit_number()) + if (!layer_tree_host()->commit_number()) { EXPECT_VECTOR_EQ(initial_scroll_, root->scroll_offset()); - else { + } else { EXPECT_VECTOR_EQ(initial_scroll_ + scroll_amount_, root->scroll_offset()); // Pretend like Javascript updated the scroll position itself. @@ -90,8 +90,8 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest { MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollSimple) -class LayerTreeHostScrollTestScrollMultipleRedraw : - public LayerTreeHostScrollTest { +class LayerTreeHostScrollTestScrollMultipleRedraw + : public LayerTreeHostScrollTest { public: LayerTreeHostScrollTestScrollMultipleRedraw() : initial_scroll_(40, 10), @@ -234,9 +234,9 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest { MULTI_THREAD_TEST_F(LayerTreeHostScrollTestFractionalScroll) -class LayerTreeHostScrollTestCaseWithChild : - public LayerTreeHostScrollTest, - public WebKit::WebLayerScrollClient { +class LayerTreeHostScrollTestCaseWithChild + : public LayerTreeHostScrollTest, + public WebKit::WebLayerScrollClient { public: LayerTreeHostScrollTestCaseWithChild() : initial_offset_(10, 20), @@ -519,9 +519,9 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest { virtual void Layout() OVERRIDE { Layer* root = layer_tree_host()->root_layer(); - if (!layer_tree_host()->commit_number()) + if (!layer_tree_host()->commit_number()) { EXPECT_VECTOR_EQ(root->scroll_offset(), initial_scroll_); - else { + } else { EXPECT_VECTOR_EQ(root->scroll_offset(), initial_scroll_ + impl_thread_scroll1_); diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h index 1f89d16..1aaf3ba 100644 --- a/cc/trees/layer_tree_impl.h +++ b/cc/trees/layer_tree_impl.h @@ -5,6 +5,9 @@ #ifndef CC_TREES_LAYER_TREE_IMPL_H_ #define CC_TREES_LAYER_TREE_IMPL_H_ +#include <string> +#include <vector> + #include "base/hash_tables.h" #include "base/values.h" #include "cc/layers/layer_impl.h" @@ -17,8 +20,8 @@ struct hash<cc::LayerImpl*> { return hash<size_t>()(reinterpret_cast<size_t>(ptr)); } }; -} // namespace BASE_HASH_NAMESPACE -#endif // COMPILER +} // namespace BASE_HASH_NAMESPACE +#endif // COMPILER namespace cc { @@ -88,7 +91,7 @@ class CC_EXPORT LayerTreeImpl { void SetRootLayer(scoped_ptr<LayerImpl>); scoped_ptr<LayerImpl> DetachLayerTree(); - void PushPropertiesTo(LayerTreeImpl*); + void PushPropertiesTo(LayerTreeImpl* tree_impl); int source_frame_number() const { return source_frame_number_; } void set_source_frame_number(int frame_number) { @@ -198,7 +201,7 @@ class CC_EXPORT LayerTreeImpl { void DidEndScroll(); protected: - LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); + explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); void UpdateSolidColorScrollbars(); @@ -249,6 +252,6 @@ class CC_EXPORT LayerTreeImpl { DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); }; -} +} // namespace cc #endif // CC_TREES_LAYER_TREE_IMPL_H_ diff --git a/cc/trees/occlusion_tracker.h b/cc/trees/occlusion_tracker.h index f659c31..7538238 100644 --- a/cc/trees/occlusion_tracker.h +++ b/cc/trees/occlusion_tracker.h @@ -5,6 +5,8 @@ #ifndef CC_TREES_OCCLUSION_TRACKER_H_ #define CC_TREES_OCCLUSION_TRACKER_H_ +#include <vector> + #include "base/basictypes.h" #include "cc/base/cc_export.h" #include "cc/base/region.h" @@ -93,7 +95,7 @@ class CC_EXPORT OcclusionTrackerBase { minimum_tracking_size_ = size; } - // The following is used for visualization purposes. + // The following is used for visualization purposes. void set_occluding_screen_space_rects_container( std::vector<gfx::Rect>* rects) { occluding_screen_space_rects_ = rects; @@ -106,7 +108,7 @@ class CC_EXPORT OcclusionTrackerBase { protected: struct StackObject { StackObject() : target(0) {} - StackObject(const LayerType* target) : target(target) {} + explicit StackObject(const LayerType* target) : target(target) {} const LayerType* target; Region occlusion_from_outside_target; Region occlusion_from_inside_target; diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h index 0df7f0a..7be52d7 100644 --- a/cc/trees/proxy.h +++ b/cc/trees/proxy.h @@ -117,14 +117,14 @@ class CC_EXPORT Proxy { friend class DebugScopedSetMainThreadBlocked; private: - DISALLOW_COPY_AND_ASSIGN(Proxy); - scoped_ptr<Thread> main_thread_; scoped_ptr<Thread> impl_thread_; #ifndef NDEBUG bool impl_thread_is_overridden_; bool is_main_thread_blocked_; #endif + + DISALLOW_COPY_AND_ASSIGN(Proxy); }; #ifndef NDEBUG @@ -149,6 +149,6 @@ class DebugScopedSetMainThreadBlocked { }; #endif -} +} // namespace cc #endif // CC_TREES_PROXY_H_ diff --git a/cc/trees/quad_culler_unittest.cc b/cc/trees/quad_culler_unittest.cc index dd9c2e4..0631838 100644 --- a/cc/trees/quad_culler_unittest.cc +++ b/cc/trees/quad_culler_unittest.cc @@ -4,6 +4,8 @@ #include "cc/trees/quad_culler.h" +#include <vector> + #include "cc/base/math_util.h" #include "cc/debug/overdraw_metrics.h" #include "cc/layers/append_quads_data.h" @@ -104,14 +106,14 @@ class QuadCullerTest : public testing::Test { return layer.Pass(); } - void AppendQuads(QuadList& quad_list, + void AppendQuads(QuadList* quad_list, SharedQuadStateList& shared_state_list, TiledLayerImpl* layer, LayerIteratorType& it, OcclusionTrackerImpl& occlusion_tracker) { occlusion_tracker.EnterLayer(it); QuadCuller quad_culler( - &quad_list, &shared_state_list, layer, occlusion_tracker, false, false); + quad_list, &shared_state_list, layer, occlusion_tracker, false, false); AppendQuadsData data; layer->AppendQuads(&quad_culler, &data); occlusion_tracker.LeaveLayer(it); @@ -158,9 +160,9 @@ TEST_F(QuadCullerTest, VerifyNoCulling) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 13u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -193,9 +195,9 @@ TEST_F(QuadCullerTest, VerifyCullChildLinesUpTopLeft) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 9u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -228,9 +230,9 @@ TEST_F(QuadCullerTest, VerifyCullWhenChildOpacityNotOne) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 13u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -263,9 +265,9 @@ TEST_F(QuadCullerTest, VerifyCullWhenChildOpaqueFlagFalse) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 13u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -298,9 +300,9 @@ TEST_F(QuadCullerTest, VerifyCullCenterTileOnly) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); ASSERT_EQ(quad_list.size(), 12u); gfx::Rect quad_visible_rect1 = quad_list[5]->visible_rect; @@ -358,9 +360,9 @@ TEST_F(QuadCullerTest, VerifyCullCenterTileNonIntegralSize1) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 2u); EXPECT_NEAR( @@ -403,9 +405,9 @@ TEST_F(QuadCullerTest, VerifyCullCenterTileNonIntegralSize2) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 2u); EXPECT_NEAR( @@ -438,9 +440,9 @@ TEST_F(QuadCullerTest, VerifyCullChildLinesUpBottomRight) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 9u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -477,9 +479,9 @@ TEST_F(QuadCullerTest, VerifyCullSubRegion) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 12u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -517,9 +519,9 @@ TEST_F(QuadCullerTest, VerifyCullSubRegion2) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 12u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -557,9 +559,9 @@ TEST_F(QuadCullerTest, VerifyCullSubRegionCheckOvercull) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 13u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 90000, 1); @@ -595,9 +597,9 @@ TEST_F(QuadCullerTest, VerifyNonAxisAlignedQuadsDontOcclude) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 13u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 130000, 1); @@ -638,9 +640,9 @@ TEST_F(QuadCullerTest, VerifyNonAxisAlignedQuadsSafelyCulled) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 12u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 100600, 1); @@ -672,9 +674,9 @@ TEST_F(QuadCullerTest, VerifyCullOutsideScissorOverTile) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 1u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 10000, 1); @@ -706,9 +708,9 @@ TEST_F(QuadCullerTest, VerifyCullOutsideScissorOverCulledTile) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 1u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 10000, 1); @@ -740,9 +742,9 @@ TEST_F(QuadCullerTest, VerifyCullOutsideScissorOverPartialTiles) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 9u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 40000, 1); @@ -774,9 +776,9 @@ TEST_F(QuadCullerTest, VerifyCullOutsideScissorOverNoTiles) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 0u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 0, 1); @@ -809,9 +811,9 @@ TEST_F(QuadCullerTest, VerifyWithoutMetrics) { LayerIteratorType it = LayerIteratorType::Begin(&render_surface_layer_list); AppendQuads( - quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, child_layer.get(), it, occlusion_tracker); AppendQuads( - quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); + &quad_list, shared_state_list, root_layer.get(), it, occlusion_tracker); EXPECT_EQ(quad_list.size(), 9u); EXPECT_NEAR( occlusion_tracker.overdraw_metrics()->pixels_drawn_opaque(), 0, 1); diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc index f217d01..c49527d 100644 --- a/cc/trees/thread_proxy.cc +++ b/cc/trees/thread_proxy.cc @@ -1004,7 +1004,8 @@ void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { layer_tree_host_impl_->SetAnticipatedDrawTime(time); if (current_resource_update_controller_on_impl_thread_) - current_resource_update_controller_on_impl_thread_->PerformMoreUpdates(time); + current_resource_update_controller_on_impl_thread_ + ->PerformMoreUpdates(time); } void ThreadProxy::ReadyToFinalizeTextureUpdates() { diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc index ee66e956..c402afc 100644 --- a/cc/trees/tree_synchronizer_unittest.cc +++ b/cc/trees/tree_synchronizer_unittest.cc @@ -5,6 +5,7 @@ #include "cc/trees/tree_synchronizer.h" #include <algorithm> +#include <vector> #include "cc/animation/layer_animation_controller.h" #include "cc/layers/layer.h" @@ -62,7 +63,7 @@ class MockLayer : public Layer { } private: - MockLayer(std::vector<int>* layer_impl_destruction_list) + explicit MockLayer(std::vector<int>* layer_impl_destruction_list) : Layer(), layer_impl_destruction_list_(layer_impl_destruction_list) {} virtual ~MockLayer() {} |