diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 03:29:29 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 03:29:29 +0000 |
commit | ed511b8dbf23c216aa87e11e9d49c1e69d82de60 (patch) | |
tree | ff1bdc0c8c74a0357c07847d4f3e9f32190930df /cc/test | |
parent | 69fc57001ee3a1496830488254710865bc8f52b3 (diff) | |
download | chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.zip chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.tar.gz chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.tar.bz2 |
cc: Fix capitalization style in chromified files.
Style-only change.
Many already-chromified files missed a variable or function name
here and there. This grabs (hopefully) all of them.
For the record, I found these with:
git gs '[^a-zA-Z0-9_>\."][a-jl-z]\+[A-Z][A-Za-z0-9_]*\($\|[ !=;,\.^&*)"]\)'
R=enne
BUG=
Review URL: https://chromiumcodereview.appspot.com/12676029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/animation_test_common.cc | 30 | ||||
-rw-r--r-- | cc/test/fake_proxy.h | 4 | ||||
-rw-r--r-- | cc/test/fake_web_scrollbar.cc | 4 | ||||
-rw-r--r-- | cc/test/fake_web_scrollbar.h | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_json_parser.cc | 6 | ||||
-rw-r--r-- | cc/test/layer_tree_test.cc | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_test.h | 2 | ||||
-rw-r--r-- | cc/test/render_pass_test_common.cc | 49 | ||||
-rw-r--r-- | cc/test/render_pass_test_utils.cc | 75 | ||||
-rw-r--r-- | cc/test/render_pass_test_utils.h | 20 | ||||
-rw-r--r-- | cc/test/tiled_layer_test_common.h | 2 |
11 files changed, 97 insertions, 99 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc index 9c025f2..4f9548d 100644 --- a/cc/test/animation_test_common.cc +++ b/cc/test/animation_test_common.cc @@ -21,27 +21,27 @@ using cc::TransformKeyframe; namespace cc { -static int nextAnimationId = 0; +static int s_next_animation_id = 0; template <class Target> int AddOpacityTransition(Target* target, double duration, - float startOpacity, - float endOpacity, - bool useTimingFunction) { + float start_opacity, + float end_opacity, + bool use_timing_function) { scoped_ptr<KeyframedFloatAnimationCurve> curve(KeyframedFloatAnimationCurve::Create()); scoped_ptr<TimingFunction> func; - if (!useTimingFunction) + if (!use_timing_function) func = EaseTimingFunction::Create(); if (duration > 0.0) - curve->AddKeyframe(FloatKeyframe::Create(0.0, startOpacity, func.Pass())); + curve->AddKeyframe(FloatKeyframe::Create(0.0, start_opacity, func.Pass())); curve->AddKeyframe(FloatKeyframe::Create(duration, - endOpacity, + end_opacity, scoped_ptr<cc::TimingFunction>())); - int id = nextAnimationId++; + int id = s_next_animation_id++; scoped_ptr<Animation> animation(Animation::Create( curve.PassAs<AnimationCurve>(), @@ -57,28 +57,28 @@ int AddOpacityTransition(Target* target, template <class Target> int AddAnimatedTransform(Target* target, double duration, - int deltaX, - int deltaY) { + int delta_x, + int delta_y) { scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::Create()); if (duration > 0.0) { - TransformOperations startOperations; - startOperations.AppendTranslate(deltaX, deltaY, 0.0); + TransformOperations start_operations; + start_operations.AppendTranslate(delta_x, delta_y, 0.0); curve->AddKeyframe(TransformKeyframe::Create( 0.0, - startOperations, + start_operations, scoped_ptr<cc::TimingFunction>())); } TransformOperations operations; - operations.AppendTranslate(deltaX, deltaY, 0.0); + operations.AppendTranslate(delta_x, delta_y, 0.0); curve->AddKeyframe(TransformKeyframe::Create( duration, operations, scoped_ptr<cc::TimingFunction>())); - int id = nextAnimationId++; + int id = s_next_animation_id++; scoped_ptr<Animation> animation(Animation::Create( curve.PassAs<AnimationCurve>(), diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h index 3be3f46..b9d37a3 100644 --- a/cc/test/fake_proxy.h +++ b/cc/test/fake_proxy.h @@ -13,8 +13,8 @@ namespace cc { class FakeProxy : public Proxy { public: - explicit FakeProxy(scoped_ptr<Thread> implThread) - : Proxy(implThread.Pass()) {} + explicit FakeProxy(scoped_ptr<Thread> impl_thread) + : Proxy(impl_thread.Pass()) {} virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE; virtual void StartPageScaleAnimation(gfx::Vector2d target_position, diff --git a/cc/test/fake_web_scrollbar.cc b/cc/test/fake_web_scrollbar.cc index 49a9de2..e536ff4 100644 --- a/cc/test/fake_web_scrollbar.cc +++ b/cc/test/fake_web_scrollbar.cc @@ -6,10 +6,6 @@ namespace cc { -void FakeWebScrollbar::setOverlay(bool is_overlay) { - is_overlay_ = is_overlay; -} - bool FakeWebScrollbar::isOverlay() const { return is_overlay_; } diff --git a/cc/test/fake_web_scrollbar.h b/cc/test/fake_web_scrollbar.h index 93ad943..331f715 100644 --- a/cc/test/fake_web_scrollbar.h +++ b/cc/test/fake_web_scrollbar.h @@ -16,7 +16,7 @@ class FakeWebScrollbar : public WebKit::WebScrollbar { return make_scoped_ptr(new FakeWebScrollbar()); } - void setOverlay(bool isOverlay); + void set_overlay(bool is_overlay) { is_overlay_ = is_overlay; } // WebScrollbar implementation virtual bool isOverlay() const OVERRIDE; diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc index 3b40170..435e2bf 100644 --- a/cc/test/layer_tree_json_parser.cc +++ b/cc/test/layer_tree_json_parser.cc @@ -79,9 +79,9 @@ scoped_refptr<Layer> ParseTreeFromValue(base::Value* val, for (int i = 0; i < 16; ++i) success &= list->GetDouble(i, &transform[i]); - gfx::Transform gfxTransform; - gfxTransform.matrix().setColMajord(transform); - new_layer->SetTransform(gfxTransform); + gfx::Transform layer_transform; + layer_transform.matrix().setColMajord(transform); + new_layer->SetTransform(layer_transform); success &= dict->GetList("Children", &list); for (ListValue::const_iterator it = list->begin(); diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 5a56c14..7726142 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -320,7 +320,7 @@ LayerTreeTest::~LayerTreeTest() {} void LayerTreeTest::EndTest() { // For the case where we EndTest during BeginTest(), set a flag to indicate - // that the test should end the second beginTest regains control. + // that the test should end the second BeginTest regains control. if (beginning_) { end_when_begin_returns_ = true; } else if (proxy()) { diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index afc20b2..8302874 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -91,7 +91,7 @@ class TimeoutTask; // LayerTreeTest methods of similar names. To track the commit process, override // these functions. // -// The test continues until someone calls endTest. endTest can be called on any +// The test continues until someone calls EndTest. EndTest can be called on any // thread, but be aware that ending the test is an asynchronous process. class LayerTreeTest : public testing::Test, public TestHooks { public: diff --git a/cc/test/render_pass_test_common.cc b/cc/test/render_pass_test_common.cc index ec2199f..7ceaef9 100644 --- a/cc/test/render_pass_test_common.cc +++ b/cc/test/render_pass_test_common.cc @@ -29,48 +29,48 @@ void TestRenderPass::AppendSharedQuadState( } void TestRenderPass::AppendOneOfEveryQuadType( - cc::ResourceProvider* resourceProvider, RenderPass::Id child_pass) { + cc::ResourceProvider* resource_provider, RenderPass::Id child_pass) { gfx::Rect rect(0, 0, 100, 100); gfx::Rect opaque_rect(10, 10, 80, 80); const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; cc::ResourceProvider::ResourceId texture_resource = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(20, 12), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(texture_resource); + resource_provider->AllocateForTesting(texture_resource); unsigned texture_id = ResourceProvider::ScopedReadLockGL( - resourceProvider, texture_resource).texture_id(); + resource_provider, texture_resource).texture_id(); cc::ResourceProvider::ResourceId resource1 = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(45, 5), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(resource1); + resource_provider->AllocateForTesting(resource1); cc::ResourceProvider::ResourceId resource2 = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(346, 61), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(resource2); + resource_provider->AllocateForTesting(resource2); cc::ResourceProvider::ResourceId resource3 = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(12, 134), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(resource3); + resource_provider->AllocateForTesting(resource3); cc::ResourceProvider::ResourceId resource4 = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(56, 12), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(resource4); + resource_provider->AllocateForTesting(resource4); cc::ResourceProvider::ResourceId resource5 = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(73, 26), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(resource5); + resource_provider->AllocateForTesting(resource5); scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); shared_state->SetAll(gfx::Transform(), @@ -178,7 +178,8 @@ void TestRenderPass::AppendOneOfEveryQuadType( scoped_ptr<cc::SharedQuadState> transformed_state = shared_state->Copy(); gfx::Transform rotation; rotation.Rotate(45); - transformed_state->content_to_target_transform = transformed_state->content_to_target_transform * rotation; + transformed_state->content_to_target_transform = + transformed_state->content_to_target_transform * rotation; scoped_ptr<cc::TileDrawQuad> transformed_tile_quad = cc::TileDrawQuad::Create(); transformed_tile_quad->SetNew(transformed_state.get(), @@ -204,11 +205,11 @@ void TestRenderPass::AppendOneOfEveryQuadType( cc::VideoLayerImpl::FramePlane planes[3]; for (int i = 0; i < 3; ++i) { planes[i].resource_id = - resourceProvider->CreateResource( + resource_provider->CreateResource( gfx::Size(20, 12), - resourceProvider->best_texture_format(), + resource_provider->best_texture_format(), ResourceProvider::TextureUsageAny); - resourceProvider->AllocateForTesting(planes[i].resource_id); + resource_provider->AllocateForTesting(planes[i].resource_id); planes[i].size = gfx::Size(100, 100); planes[i].format = GL_LUMINANCE; } diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index f803b4c..e9614c4 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -15,61 +15,62 @@ namespace cc { -TestRenderPass* addRenderPass(RenderPassList& passList, +TestRenderPass* AddRenderPass(RenderPassList& pass_list, RenderPass::Id id, - const gfx::Rect& outputRect, - const gfx::Transform& rootTransform) { + gfx::Rect output_rect, + const gfx::Transform& root_transform) { scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); - pass->SetNew(id, outputRect, outputRect, rootTransform); + pass->SetNew(id, output_rect, output_rect, root_transform); TestRenderPass* saved = pass.get(); - passList.push_back(pass.PassAs<RenderPass>()); + pass_list.push_back(pass.PassAs<RenderPass>()); return saved; } -SolidColorDrawQuad* addQuad(TestRenderPass* pass, - const gfx::Rect& rect, +SolidColorDrawQuad* AddQuad(TestRenderPass* pass, + gfx::Rect rect, SkColor color) { - MockQuadCuller quadSink(&pass->quad_list, &pass->shared_quad_state_list); + MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); AppendQuadsData data(pass->id); - SharedQuadState* sharedState = - quadSink.UseSharedQuadState(SharedQuadState::Create()); - sharedState->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1); + SharedQuadState* shared_state = + quad_sink.UseSharedQuadState(SharedQuadState::Create()); + shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1); scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); - quad->SetNew(sharedState, rect, color); - SolidColorDrawQuad* quadPtr = quad.get(); - quadSink.Append(quad.PassAs<DrawQuad>(), &data); - return quadPtr; + quad->SetNew(shared_state, rect, color); + SolidColorDrawQuad* quad_ptr = quad.get(); + quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + return quad_ptr; } -SolidColorDrawQuad* addClippedQuad(TestRenderPass* pass, - const gfx::Rect& rect, +SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, + gfx::Rect rect, SkColor color) { - MockQuadCuller quadSink(&pass->quad_list, &pass->shared_quad_state_list); + MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); AppendQuadsData data(pass->id); - SharedQuadState* sharedState = - quadSink.UseSharedQuadState(SharedQuadState::Create()); - sharedState->SetAll(gfx::Transform(), rect.size(), rect, rect, true, 1); + SharedQuadState* shared_state = + quad_sink.UseSharedQuadState(SharedQuadState::Create()); + shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, true, 1); scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); - quad->SetNew(sharedState, rect, color); - SolidColorDrawQuad* quadPtr = quad.get(); - quadSink.Append(quad.PassAs<DrawQuad>(), &data); - return quadPtr; + quad->SetNew(shared_state, rect, color); + SolidColorDrawQuad* quad_ptr = quad.get(); + quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + return quad_ptr; } -void addRenderPassQuad(TestRenderPass* toPass, - TestRenderPass* contributingPass) { - MockQuadCuller quadSink(&toPass->quad_list, &toPass->shared_quad_state_list); - AppendQuadsData data(toPass->id); - gfx::Rect outputRect = contributingPass->output_rect; - SharedQuadState* sharedState = - quadSink.UseSharedQuadState(SharedQuadState::Create()); - sharedState->SetAll( - gfx::Transform(), outputRect.size(), outputRect, outputRect, false, 1); +void AddRenderPassQuad(TestRenderPass* to_pass, + TestRenderPass* contributing_pass) { + MockQuadCuller quad_sink(&to_pass->quad_list, + &to_pass->shared_quad_state_list); + AppendQuadsData data(to_pass->id); + gfx::Rect output_rect = contributing_pass->output_rect; + SharedQuadState* shared_state = + quad_sink.UseSharedQuadState(SharedQuadState::Create()); + shared_state->SetAll( + gfx::Transform(), output_rect.size(), output_rect, output_rect, false, 1); scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); - quad->SetNew(sharedState, outputRect, contributingPass->id, false, 0, - outputRect, gfx::RectF(), WebKit::WebFilterOperations(), + quad->SetNew(shared_state, output_rect, contributing_pass->id, false, 0, + output_rect, gfx::RectF(), WebKit::WebFilterOperations(), skia::RefPtr<SkImageFilter>(), WebKit::WebFilterOperations()); - quadSink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>(), &data); } } // namespace cc diff --git a/cc/test/render_pass_test_utils.h b/cc/test/render_pass_test_utils.h index 86715c0..5c2f676 100644 --- a/cc/test/render_pass_test_utils.h +++ b/cc/test/render_pass_test_utils.h @@ -21,25 +21,25 @@ class TestRenderPass; // Adds a new render pass with the provided properties to the given // render pass list. -TestRenderPass* addRenderPass( - RenderPassList& passList, +TestRenderPass* AddRenderPass( + RenderPassList& pass_list, RenderPass::Id id, - const gfx::Rect& outputRect, - const gfx::Transform& rootTransform); + gfx::Rect output_rect, + const gfx::Transform& root_transform); // Adds a solid quad to a given render pass. -SolidColorDrawQuad* addQuad(TestRenderPass* pass, - const gfx::Rect& rect, +SolidColorDrawQuad* AddQuad(TestRenderPass* pass, + gfx::Rect rect, SkColor color); // Adds a solid quad to a given render pass and sets is_clipped=true. -SolidColorDrawQuad* addClippedQuad(TestRenderPass* pass, - const gfx::Rect& rect, +SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, + gfx::Rect rect, SkColor color); // Adds a render pass quad to an existing render pass. -void addRenderPassQuad(TestRenderPass* toPass, - TestRenderPass* contributingPass); +void AddRenderPassQuad(TestRenderPass* to_pass, + TestRenderPass* contributing_pass); } // namespace cc diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h index 3012fd5..11666d3 100644 --- a/cc/test/tiled_layer_test_common.h +++ b/cc/test/tiled_layer_test_common.h @@ -119,7 +119,7 @@ class FakeTiledLayer : public TiledLayer { FakeLayerUpdater* fake_layer_updater() { return fake_updater_.get(); } gfx::RectF update_rect() { return update_rect_; } - // Simulate calcDrawProperties. + // Simulate CalcDrawProperties. void UpdateContentsScale(float ideal_contents_scale); protected: |