diff options
-rw-r--r-- | cc/animation/layer_animation_controller_unittest.cc | 2 | ||||
-rw-r--r-- | cc/animation/transform_operation.cc | 4 | ||||
-rw-r--r-- | cc/base/region.h | 4 | ||||
-rw-r--r-- | cc/base/scoped_ptr_deque.h | 2 | ||||
-rw-r--r-- | cc/debug/debug_colors.cc | 8 | ||||
-rw-r--r-- | cc/debug/fake_web_graphics_context_3d.h | 2 | ||||
-rw-r--r-- | cc/debug/latency_info.cc | 2 | ||||
-rw-r--r-- | cc/layers/layer_position_constraint.h | 6 | ||||
-rw-r--r-- | cc/layers/layer_unittest.cc | 4 | ||||
-rw-r--r-- | cc/layers/scrollbar_layer_impl.h | 4 | ||||
-rw-r--r-- | cc/output/delegating_renderer.h | 3 | ||||
-rw-r--r-- | cc/output/output_surface.cc | 27 | ||||
-rw-r--r-- | cc/output/shader_unittest.cc | 2 | ||||
-rw-r--r-- | cc/output/texture_copier.cc | 2 | ||||
-rw-r--r-- | cc/quads/content_draw_quad_base.h | 2 | ||||
-rw-r--r-- | cc/quads/draw_quad.h | 12 | ||||
-rw-r--r-- | cc/quads/picture_draw_quad.h | 2 | ||||
-rw-r--r-- | cc/resources/prioritized_resource.cc | 11 | ||||
-rw-r--r-- | cc/resources/prioritized_resource_unittest.cc | 1 | ||||
-rw-r--r-- | cc/test/fake_web_scrollbar.h | 3 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc | 3 |
21 files changed, 56 insertions, 50 deletions
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc index 4600f12..6e2e8e2 100644 --- a/cc/animation/layer_animation_controller_unittest.cc +++ b/cc/animation/layer_animation_controller_unittest.cc @@ -501,7 +501,7 @@ TEST(LayerAnimationControllerTest, // Tests animations that are waiting for a synchronized start time do not // finish. TEST(LayerAnimationControllerTest, - AnimationsWaitingForStartTimeDoNotFinishIfTheyWaitLongerToStartThanTheirDuration) { + AnimationsWaitingForStartTimeDoNotFinishIfTheyOutwaitTheirFinish) { scoped_ptr<AnimationEventsVector> events( make_scoped_ptr(new AnimationEventsVector)); FakeLayerAnimationValueObserver dummy; diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc index 5140722..e1468bf 100644 --- a/cc/animation/transform_operation.cc +++ b/cc/animation/transform_operation.cc @@ -117,10 +117,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/base/region.h b/cc/base/region.h index c71d880..fd2a7e5 100644 --- a/cc/base/region.h +++ b/cc/base/region.h @@ -19,7 +19,7 @@ class CC_EXPORT Region { public: Region(); Region(const Region& region); - Region(gfx::Rect rect); + Region(gfx::Rect rect); // NOLINT(runtime/explicit) ~Region(); const Region& operator=(gfx::Rect rect); @@ -56,7 +56,7 @@ class CC_EXPORT Region { class CC_EXPORT Iterator { public: Iterator(); - Iterator(const Region& region); + explicit Iterator(const Region& region); ~Iterator(); gfx::Rect rect() const { diff --git a/cc/base/scoped_ptr_deque.h b/cc/base/scoped_ptr_deque.h index 35289f1..cb4adfc 100644 --- a/cc/base/scoped_ptr_deque.h +++ b/cc/base/scoped_ptr_deque.h @@ -33,7 +33,7 @@ class ScopedPtrDeque { // to methods on the ScopedPtrDeque class to appear in the deque. class iterator : public std::deque<T*>::iterator { public: - iterator(const typename std::deque<T*>::iterator& other) + explicit iterator(const typename std::deque<T*>::iterator& other) : std::deque<T*>::iterator(other) {} T* const& operator*() { return std::deque<T*>::iterator::operator*(); } }; diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc index 00b1e07..cc22297 100644 --- a/cc/debug/debug_colors.cc +++ b/cc/debug/debug_colors.cc @@ -129,8 +129,12 @@ int DebugColors::SolidColorTileBorderWidth(const LayerTreeImpl* tree_impl) { } // Picture tile borders are dark grey. -SkColor DebugColors::PictureTileBorderColor() { return SkColorSetARGB(64, 64, 64, 0); } -int DebugColors::PictureTileBorderWidth(const LayerTreeImpl* tree_impl) { return Scale(1, tree_impl); } +SkColor DebugColors::PictureTileBorderColor() { + return SkColorSetARGB(64, 64, 64, 0); +} +int DebugColors::PictureTileBorderWidth(const LayerTreeImpl* tree_impl) { + return Scale(1, tree_impl); +} // ======= Checkerboard colors ======= diff --git a/cc/debug/fake_web_graphics_context_3d.h b/cc/debug/fake_web_graphics_context_3d.h index f1c8525..e9d46b2 100644 --- a/cc/debug/fake_web_graphics_context_3d.h +++ b/cc/debug/fake_web_graphics_context_3d.h @@ -5,6 +5,8 @@ #ifndef CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_ #define CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_ +#include <string> + #include "base/compiler_specific.h" #include "cc/base/cc_export.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" diff --git a/cc/debug/latency_info.cc b/cc/debug/latency_info.cc index d76be74..f59b07b 100644 --- a/cc/debug/latency_info.cc +++ b/cc/debug/latency_info.cc @@ -57,5 +57,5 @@ void LatencyInfo::Clear() { latency_components.clear(); } -} // namespace cc +} // namespace cc diff --git a/cc/layers/layer_position_constraint.h b/cc/layers/layer_position_constraint.h index b800bf0..9a57513 100644 --- a/cc/layers/layer_position_constraint.h +++ b/cc/layers/layer_position_constraint.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_LAYER_POSITION_CONSTRAINT_H_ -#define CC_LAYER_POSITION_CONSTRAINT_H_ +#ifndef CC_LAYERS_LAYER_POSITION_CONSTRAINT_H_ +#define CC_LAYERS_LAYER_POSITION_CONSTRAINT_H_ #include "cc/base/cc_export.h" @@ -35,4 +35,4 @@ class CC_EXPORT LayerPositionConstraint { } // namespace cc -#endif // CC_LAYER_POSITION_CONSTRAINT_H_ +#endif // CC_LAYERS_LAYER_POSITION_CONSTRAINT_H_ diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc index 5d37c59..eaf9c7b 100644 --- a/cc/layers/layer_unittest.cc +++ b/cc/layers/layer_unittest.cc @@ -644,7 +644,7 @@ TEST_F(LayerTest, PushPropertiesCausesSurfacePropertyChangedForOpacity) { } TEST_F(LayerTest, - PushPropertiesDoesNotCauseSurfacePropertyChangedDuringImplOnlyTransformAnimation) { + PushPropsDoesntCauseSurfacePropertyChangedDuringImplOnlyTransformAnim) { scoped_refptr<Layer> test_layer = Layer::Create(); scoped_ptr<LayerImpl> impl_layer = LayerImpl::Create(host_impl_.active_tree(), 1); @@ -682,7 +682,7 @@ TEST_F(LayerTest, } TEST_F(LayerTest, - PushPropertiesDoesNotCauseSurfacePropertyChangedDuringImplOnlyOpacityAnimation) { + PushPropsDoesntCauseSurfacePropertyChangedDuringImplOnlyOpacityAnim) { scoped_refptr<Layer> test_layer = Layer::Create(); scoped_ptr<LayerImpl> impl_layer = LayerImpl::Create(host_impl_.active_tree(), 1); diff --git a/cc/layers/scrollbar_layer_impl.h b/cc/layers/scrollbar_layer_impl.h index 4a1da30..96ad4bf 100644 --- a/cc/layers/scrollbar_layer_impl.h +++ b/cc/layers/scrollbar_layer_impl.h @@ -89,8 +89,8 @@ class CC_EXPORT ScrollbarLayerImpl : public ScrollbarLayerImplBase { virtual int totalSize() const; virtual bool isScrollViewScrollbar() const; virtual bool isScrollableAreaActive() const; - virtual void getTickmarks(WebKit::WebVector<WebKit::WebRect>& tickmarks) - const; + virtual void getTickmarks( + WebKit::WebVector<WebKit::WebRect>& tickmarks /* NOLINT */) const; virtual WebScrollbar::ScrollbarControlSize controlSize() const; virtual WebScrollbar::ScrollbarPart pressedPart() const; virtual WebScrollbar::ScrollbarPart hoveredPart() const; diff --git a/cc/output/delegating_renderer.h b/cc/output/delegating_renderer.h index e65cf66..7b7c5f3 100644 --- a/cc/output/delegating_renderer.h +++ b/cc/output/delegating_renderer.h @@ -15,8 +15,7 @@ namespace cc { class OutputSurface; class ResourceProvider; -class CC_EXPORT DelegatingRenderer : - public Renderer { +class CC_EXPORT DelegatingRenderer : public Renderer { public: static scoped_ptr<DelegatingRenderer> Create( RendererClient* client, diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc index 8312790..3af1fd9 100644 --- a/cc/output/output_surface.cc +++ b/cc/output/output_surface.cc @@ -24,22 +24,19 @@ using std::vector; namespace cc { -class OutputSurfaceCallbacks : - public WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM, - public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { +class OutputSurfaceCallbacks + : public WebKit::WebGraphicsContext3D:: + WebGraphicsSwapBuffersCompleteCallbackCHROMIUM, + public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { public: - explicit OutputSurfaceCallbacks(OutputSurfaceClient* client) - : client_(client) {} - - // WK:WGC3D::WGSwapBuffersCompleteCallbackCHROMIUM implementation. - virtual void onSwapBuffersComplete() { - client_->OnSwapBuffersComplete(); - } - - // WK:WGC3D::WGContextLostCallback implementation. - virtual void onContextLost() { - client_->DidLoseOutputSurface(); - } + explicit OutputSurfaceCallbacks(OutputSurfaceClient* client) + : client_(client) {} + + // WK:WGC3D::WGSwapBuffersCompleteCallbackCHROMIUM implementation. + virtual void onSwapBuffersComplete() { client_->OnSwapBuffersComplete(); } + + // WK:WGC3D::WGContextLostCallback implementation. + virtual void onContextLost() { client_->DidLoseOutputSurface(); } private: OutputSurfaceClient* client_; diff --git a/cc/output/shader_unittest.cc b/cc/output/shader_unittest.cc index adbe887..e52376f 100644 --- a/cc/output/shader_unittest.cc +++ b/cc/output/shader_unittest.cc @@ -43,4 +43,4 @@ TEST(ShaderTest, HighpThresholds) { TexCoordPrecisionRequired(&context, threshold_min, bigSize)); } -} +} // namespace cc diff --git a/cc/output/texture_copier.cc b/cc/output/texture_copier.cc index 1ad0ef0..3b1b708 100644 --- a/cc/output/texture_copier.cc +++ b/cc/output/texture_copier.cc @@ -90,7 +90,7 @@ void AcceleratedTextureCopier::CopyTexture(Parameters parameters) { if (!blit_program_->initialized()) blit_program_->Initialize(context_, using_bind_uniforms_); - // TODO(danakj: Use EXT_framebuffer_blit if available. + // TODO(danakj): Use EXT_framebuffer_blit if available. GLC(context_, context_->useProgram(blit_program_->program())); } diff --git a/cc/quads/content_draw_quad_base.h b/cc/quads/content_draw_quad_base.h index f91390b..b2c936f 100644 --- a/cc/quads/content_draw_quad_base.h +++ b/cc/quads/content_draw_quad_base.h @@ -43,6 +43,6 @@ class CC_EXPORT ContentDrawQuadBase : public DrawQuad { virtual ~ContentDrawQuadBase(); }; -} +} // namespace cc #endif // CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_ diff --git a/cc/quads/draw_quad.h b/cc/quads/draw_quad.h index 3986880..2073e1d 100644 --- a/cc/quads/draw_quad.h +++ b/cc/quads/draw_quad.h @@ -38,8 +38,12 @@ class CC_EXPORT DrawQuad { const SharedQuadState* copied_shared_quad_state) const; // TODO(danakj): Chromify or remove these SharedQuadState helpers. - const gfx::Transform& quadTransform() const { return shared_quad_state->content_to_target_transform; } - gfx::Rect visibleContentRect() const { return shared_quad_state->visible_content_rect; } + const gfx::Transform& quadTransform() const { + return shared_quad_state->content_to_target_transform; + } + gfx::Rect visibleContentRect() const { + return shared_quad_state->visible_content_rect; + } gfx::Rect clipRect() const { return shared_quad_state->clip_rect; } bool isClipped() const { return shared_quad_state->is_clipped; } float opacity() const { return shared_quad_state->opacity; } @@ -74,8 +78,8 @@ class CC_EXPORT DrawQuad { !opaque_rect.Contains(visible_rect); } - typedef base::Callback<ResourceProvider::ResourceId( - ResourceProvider::ResourceId)> ResourceIteratorCallback; + typedef ResourceProvider::ResourceId ResourceId; + typedef base::Callback<ResourceId(ResourceId)> ResourceIteratorCallback; virtual void IterateResources(const ResourceIteratorCallback& callback) = 0; // Is the left edge of this tile aligned with the originating layer's diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h index 847c4f8a..40e8487 100644 --- a/cc/quads/picture_draw_quad.h +++ b/cc/quads/picture_draw_quad.h @@ -57,6 +57,6 @@ class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { PictureDrawQuad(); }; -} +} // namespace cc #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_ diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc index fdc20c3..78fd900 100644 --- a/cc/resources/prioritized_resource.cc +++ b/cc/resources/prioritized_resource.cc @@ -127,13 +127,12 @@ PrioritizedResource::Backing::Backing(unsigned id, priority_at_last_priority_update_(PriorityCalculator::LowestPriority()), was_above_priority_cutoff_at_last_priority_update_(false), in_drawing_impl_tree_(false), - resource_has_been_deleted_(false) -#ifndef NDEBUG - , - resource_provider_(resource_provider) +#ifdef NDEBUG + resource_has_been_deleted_(false) {} +#else + resource_has_been_deleted_(false), + resource_provider_(resource_provider) {} #endif - { -} PrioritizedResource::Backing::~Backing() { DCHECK(!owner_); diff --git a/cc/resources/prioritized_resource_unittest.cc b/cc/resources/prioritized_resource_unittest.cc index 7dd5444..96cbe42 100644 --- a/cc/resources/prioritized_resource_unittest.cc +++ b/cc/resources/prioritized_resource_unittest.cc @@ -73,7 +73,6 @@ class PrioritizedResourceTest : public testing::Test { void ResourceManagerAssertInvariants( PrioritizedResourceManager* resource_manager) { - #ifndef NDEBUG DebugScopedSetImplThreadAndMainThreadBlocked impl_thread_and_main_thread_blocked(&proxy_); diff --git a/cc/test/fake_web_scrollbar.h b/cc/test/fake_web_scrollbar.h index 881cf3d..444ee66 100644 --- a/cc/test/fake_web_scrollbar.h +++ b/cc/test/fake_web_scrollbar.h @@ -28,7 +28,8 @@ class FakeWebScrollbar : public WebKit::WebScrollbar { virtual int totalSize() const OVERRIDE; virtual bool isScrollViewScrollbar() const OVERRIDE; virtual bool isScrollableAreaActive() const OVERRIDE; - virtual void getTickmarks(WebKit::WebVector<WebKit::WebRect>& tickmarks) const + virtual void getTickmarks( + WebKit::WebVector<WebKit::WebRect>& tickmarks /* NOLINT */) const OVERRIDE {} virtual ScrollbarControlSize controlSize() const OVERRIDE; virtual ScrollbarPart pressedPart() const OVERRIDE; diff --git a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc index 18efae3..e0f10ab 100644 --- a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc +++ b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc @@ -58,7 +58,8 @@ class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { class BlueYellowLayerClient : public ContentLayerClient { public: - BlueYellowLayerClient(gfx::Rect layer_rect) : layer_rect_(layer_rect) { } + explicit BlueYellowLayerClient(gfx::Rect layer_rect) + : layer_rect_(layer_rect) {} virtual void DidChangeLayerCanUseLCDText() OVERRIDE { } |