summaryrefslogtreecommitdiffstats
path: root/cc/layers
diff options
context:
space:
mode:
Diffstat (limited to 'cc/layers')
-rw-r--r--cc/layers/delegated_renderer_layer_impl.cc20
-rw-r--r--cc/layers/delegated_renderer_layer_impl_unittest.cc32
-rw-r--r--cc/layers/draw_properties.h4
-rw-r--r--cc/layers/heads_up_display_layer.cc4
-rw-r--r--cc/layers/heads_up_display_layer_impl.cc2
-rw-r--r--cc/layers/io_surface_layer_impl.cc2
-rw-r--r--cc/layers/layer.cc12
-rw-r--r--cc/layers/layer.h6
-rw-r--r--cc/layers/layer_impl.cc18
-rw-r--r--cc/layers/layer_impl.h16
-rw-r--r--cc/layers/layer_impl_unittest.cc2
-rw-r--r--cc/layers/layer_iterator.cc2
-rw-r--r--cc/layers/layer_unittest.cc22
-rw-r--r--cc/layers/nine_patch_layer.cc8
-rw-r--r--cc/layers/nine_patch_layer_impl.cc46
-rw-r--r--cc/layers/picture_image_layer_impl.cc8
-rw-r--r--cc/layers/picture_image_layer_impl.h8
-rw-r--r--cc/layers/picture_layer_impl.cc45
-rw-r--r--cc/layers/picture_layer_impl_unittest.cc20
-rw-r--r--cc/layers/render_surface_impl.cc2
-rw-r--r--cc/layers/render_surface_unittest.cc8
-rw-r--r--cc/layers/scrollbar_geometry_fixed_thumb.cc10
-rw-r--r--cc/layers/scrollbar_layer.cc20
-rw-r--r--cc/layers/scrollbar_layer.h18
-rw-r--r--cc/layers/scrollbar_layer_impl.cc18
-rw-r--r--cc/layers/scrollbar_layer_unittest.cc6
-rw-r--r--cc/layers/solid_color_layer_impl.cc4
-rw-r--r--cc/layers/solid_color_layer_impl_unittest.cc6
-rw-r--r--cc/layers/texture_layer_unittest.cc22
-rw-r--r--cc/layers/tiled_layer_impl_unittest.cc4
-rw-r--r--cc/layers/tiled_layer_unittest.cc2
-rw-r--r--cc/layers/video_layer_impl.cc6
32 files changed, 202 insertions, 201 deletions
diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc
index 2614b0c..8669f6f 100644
--- a/cc/layers/delegated_renderer_layer_impl.cc
+++ b/cc/layers/delegated_renderer_layer_impl.cc
@@ -159,8 +159,8 @@ void DelegatedRendererLayerImpl::ClearRenderPasses() {
}
scoped_ptr<LayerImpl> DelegatedRendererLayerImpl::CreateLayerImpl(
- LayerTreeImpl* treeImpl) {
- return DelegatedRendererLayerImpl::Create(treeImpl, id()).PassAs<LayerImpl>();
+ LayerTreeImpl* tree_impl) {
+ return DelegatedRendererLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
void DelegatedRendererLayerImpl::DidLoseOutputSurface() {
@@ -197,8 +197,8 @@ RenderPass::Id DelegatedRendererLayerImpl::ConvertDelegatedRenderPassId(
base::hash_map<RenderPass::Id, int>::const_iterator found =
render_passes_index_by_id_.find(delegated_render_pass_id);
DCHECK(found != render_passes_index_by_id_.end());
- unsigned delegatedRenderPassIndex = found->second;
- return RenderPass::Id(id(), IndexToId(delegatedRenderPassIndex));
+ unsigned delegated_render_pass_index = found->second;
+ return RenderPass::Id(id(), IndexToId(delegated_render_pass_index));
}
void DelegatedRendererLayerImpl::AppendContributingRenderPasses(
@@ -233,20 +233,20 @@ void DelegatedRendererLayerImpl::AppendQuads(
DCHECK(root_delegated_render_pass->output_rect.origin().IsOrigin());
gfx::Size frame_size = root_delegated_render_pass->output_rect.size();
- // If the index of the renderPassId is 0, then it is a renderPass generated
+ // If the index of the EenderPassId is 0, then it is a RenderPass generated
// for a layer in this compositor, not the delegated renderer. Then we want to
- // merge our root renderPass with the target renderPass. Otherwise, it is some
- // renderPass which we added from the delegated renderer.
+ // merge our root RenderPass with the target RenderPass. Otherwise, it is some
+ // RenderPass which we added from the delegated renderer.
bool should_merge_root_render_pass_with_target = !target_render_pass_id.index;
if (should_merge_root_render_pass_with_target) {
- // Verify that the renderPass we are appending to is created our
- // renderTarget.
+ // Verify that the RenderPass we are appending to is created our
+ // render_target.
DCHECK(target_render_pass_id.layer_id == render_target()->id());
AppendRenderPassQuads(
quad_sink, append_quads_data, root_delegated_render_pass, frame_size);
} else {
- // Verify that the renderPass we are appending to was created by us.
+ // Verify that the RenderPass we are appending to was created by us.
DCHECK(target_render_pass_id.layer_id == id());
int render_pass_index = IdToIndex(target_render_pass_id.index);
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc
index 8968996..5a21abc 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -93,25 +93,25 @@ class DelegatedRendererLayerImplTestSimple
delegated_renderer_layer->SetTransform(transform);
ScopedPtrVector<RenderPass> delegated_render_passes;
- TestRenderPass* pass1 = addRenderPass(
+ TestRenderPass* pass1 = AddRenderPass(
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(
+ AddQuad(pass1, gfx::Rect(0, 0, 6, 6), 33u);
+ TestRenderPass* pass2 = AddRenderPass(
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(
+ AddQuad(pass2, gfx::Rect(0, 0, 7, 7), 22u);
+ AddRenderPassQuad(pass2, pass1);
+ TestRenderPass* pass3 = AddRenderPass(
delegated_render_passes,
RenderPass::Id(9, 8),
gfx::Rect(0, 0, 8, 8),
gfx::Transform());
- addRenderPassQuad(pass3, pass2);
+ AddRenderPassQuad(pass3, pass2);
delegated_renderer_layer->SetFrameDataForRenderPasses(
&delegated_render_passes);
@@ -276,7 +276,7 @@ TEST_F(DelegatedRendererLayerImplTestSimple, DoesNotOwnARenderSurface) {
EXPECT_TRUE(host_impl_->PrepareToDraw(&frame));
// If the DelegatedRendererLayer is axis aligned and has opacity 1, then it
- // has no need to be a renderSurface for the quads it carries.
+ // has no need to be a RenderSurface for the quads it carries.
EXPECT_FALSE(delegated_renderer_layer_->render_surface());
host_impl_->DrawLayers(&frame, base::TimeTicks::Now());
@@ -489,7 +489,7 @@ class DelegatedRendererLayerImplTestTransform
bool child_pass_clipped = false;
{
- TestRenderPass* pass = addRenderPass(
+ TestRenderPass* pass = AddRenderPass(
delegated_render_passes,
RenderPass::Id(10, 7),
child_pass_rect,
@@ -524,7 +524,7 @@ class DelegatedRendererLayerImplTestTransform
gfx::Rect root_pass_clip_rect(10, 10, 35, 35);
bool root_pass_clipped = root_delegated_render_pass_is_clipped_;
- TestRenderPass* pass = addRenderPass(
+ TestRenderPass* pass = AddRenderPass(
delegated_render_passes,
RenderPass::Id(9, 6),
root_pass_rect,
@@ -650,7 +650,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsUnclipped_NoSurface) {
&contrib_delegated_shared_quad_state);
// When the quads don't have a clip of their own, the clip rect is set to
- // the drawableContentRect of the delegated renderer layer.
+ // the drawable_content_rect of the delegated renderer layer.
EXPECT_EQ(gfx::Rect(21, 21, 60, 60).ToString(),
root_delegated_shared_quad_state->clip_rect.ToString());
@@ -704,7 +704,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsClipped_NoSurface) {
&contrib_delegated_shared_quad_state);
// Since the quads have a clip_rect it should be modified by delegated
- // renderer layer's drawTransform.
+ // renderer layer's draw_transform.
// The position of the resulting clip_rect is:
// (clip rect position (10) * scale to layer (30/50) + translate (8)) *
// layer scale (2) + layer position (20) = 48
@@ -886,7 +886,7 @@ class DelegatedRendererLayerImplTestClip
bool child_pass_clipped = false;
{
- TestRenderPass* pass = addRenderPass(
+ TestRenderPass* pass = AddRenderPass(
delegated_render_passes,
RenderPass::Id(10, 7),
child_pass_rect,
@@ -919,7 +919,7 @@ class DelegatedRendererLayerImplTestClip
gfx::Rect root_pass_clip_rect(5, 5, 40, 40);
bool root_pass_clipped = root_delegated_render_pass_is_clipped_;
- TestRenderPass* pass = addRenderPass(
+ TestRenderPass* pass = AddRenderPass(
delegated_render_passes,
RenderPass::Id(9, 6),
root_pass_rect,
@@ -1025,7 +1025,7 @@ TEST_F(DelegatedRendererLayerImplTestClip,
contrib_delegated_quad_list[0]->shared_quad_state;
// When the quads don't have a clip of their own, the clip rect is set to
- // the drawableContentRect of the delegated renderer layer.
+ // the drawable_content_rect of the delegated renderer layer.
EXPECT_EQ(gfx::Rect(20, 20, 50, 50).ToString(),
root_delegated_shared_quad_state->clip_rect.ToString());
// Quads are clipped to the delegated renderer layer.
@@ -1087,7 +1087,7 @@ TEST_F(DelegatedRendererLayerImplTestClip,
contrib_delegated_quad_list[0]->shared_quad_state;
// When the quads don't have a clip of their own, the clip rect is set to
- // the drawableContentRect of the delegated renderer layer. When the layer
+ // the drawable_content_rect of the delegated renderer layer. When the layer
// is clipped, that should be seen in the quads' clip_rect.
EXPECT_EQ(gfx::Rect(21, 27, 23, 21).ToString(),
root_delegated_shared_quad_state->clip_rect.ToString());
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index aba8c27..ad598bc 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -37,7 +37,7 @@ struct CC_EXPORT DrawProperties {
gfx::Transform screen_space_transform;
// DrawProperties::opacity may be different than LayerType::opacity,
- // particularly in the case when a renderSurface re-parents the layer's
+ // particularly in the case when a RenderSurface re-parents the layer's
// opacity, or when opacity is compounded by the hierarchy.
float opacity;
@@ -53,7 +53,7 @@ struct CC_EXPORT DrawProperties {
// True if the layer can use LCD text.
bool can_use_lcd_text;
- // True if the layer needs to be clipped by clipRect.
+ // True if the layer needs to be clipped by clip_rect.
bool is_clipped;
// The layer whose coordinate space this layer draws into. This can be
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index 51a6bcc..f2d46ed 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -56,8 +56,8 @@ void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*,
bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
- LayerTreeImpl* treeImpl) {
- return HeadsUpDisplayLayerImpl::Create(treeImpl, layer_id_).
+ LayerTreeImpl* tree_impl) {
+ return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_).
PassAs<LayerImpl>();
}
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 566c899..929ff58 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -85,7 +85,7 @@ void HeadsUpDisplayLayerImpl::WillDraw(ResourceProvider* resource_provider) {
if (!hud_texture_)
hud_texture_ = ScopedResource::create(resource_provider);
- // TODO(danakj): Scale the HUD by deviceScale to make it more friendly under
+ // TODO(danakj): Scale the HUD by device scale to make it more friendly under
// high DPI.
// TODO(danakj): The HUD could swap between two textures instead of creating a
diff --git a/cc/layers/io_surface_layer_impl.cc b/cc/layers/io_surface_layer_impl.cc
index 3bfc1de..d6a4ba3 100644
--- a/cc/layers/io_surface_layer_impl.cc
+++ b/cc/layers/io_surface_layer_impl.cc
@@ -83,7 +83,7 @@ void IOSurfaceLayerImpl::WillDraw(ResourceProvider* resource_provider) {
io_surface_size_.height(),
io_surface_id_,
0);
- // Do not check for error conditions. texImageIOSurface2DCHROMIUM is
+ // Do not check for error conditions. texImageIOSurface2DCHROMIUM() is
// supposed to hold on to the last good IOSurface if the new one is already
// closed. This is only a possibility during live resizing of plugins.
// However, it seems that this is not sufficient to completely guard against
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index b07b308..105b4e4 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -311,10 +311,10 @@ void Layer::CalculateContentsScale(
bool animating_transform_to_screen,
float* contents_scale_x,
float* contents_scale_y,
- gfx::Size* contentBounds) {
+ gfx::Size* content_bounds) {
*contents_scale_x = 1;
*contents_scale_y = 1;
- *contentBounds = bounds();
+ *content_bounds = bounds();
}
void Layer::SetMasksToBounds(bool masks_to_bounds) {
@@ -601,7 +601,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
// If the main thread commits multiple times before the impl thread actually
// draws, then damage tracking will become incorrect if we simply clobber the
- // updateRect here. The LayerImpl's updateRect needs to accumulate (i.e.
+ // update_rect here. The LayerImpl's update_rect needs to accumulate (i.e.
// union) any update changes that have occurred on the main thread.
update_rect_.Union(layer->update_rect());
layer->set_update_rect(update_rect_);
@@ -612,7 +612,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->layer_tree_impl()->FindActiveTreeLayerById(id());
// Update the scroll delta from the active layer, which may have
// adjusted its scroll delta prior to this pending layer being created.
- // This code is identical to that in LayerImpl::setScrollDelta.
+ // This code is identical to that in LayerImpl::SetScrollDelta.
if (active_twin) {
DCHECK(layer->sent_scroll_delta().IsZero());
layer->SetScrollDelta(active_twin->scroll_delta() -
@@ -702,7 +702,7 @@ void Layer::OnOpacityAnimated(float opacity) {
// This is called due to an ongoing accelerated animation. Since this
// animation is also being run on the impl thread, there is no need to request
// a commit to push this value over, so set the value directly rather than
- // calling setOpacity.
+ // calling SetOpacity.
opacity_ = opacity;
}
@@ -710,7 +710,7 @@ void Layer::OnTransformAnimated(const gfx::Transform& transform) {
// This is called due to an ongoing accelerated animation. Since this
// animation is also being run on the impl thread, there is no need to request
// a commit to push this value over, so set this value directly rather than
- // calling setTransform.
+ // calling SetTransform.
transform_ = transform;
}
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index c0c34cc..2e72e63 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -279,9 +279,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
void ClearRenderSurface() { draw_properties_.render_surface.reset(); }
void CreateRenderSurface();
- // The contentsScale converts from logical, non-page-scaled pixels to target
- // pixels. The contentsScale is 1 for the root layer as it is already in
- // physical pixels. By default contentsScale is forced to be 1 except for
+ // The contents scale converts from logical, non-page-scaled pixels to target
+ // pixels. The contents scale is 1 for the root layer as it is already in
+ // physical pixels. By default contents scale is forced to be 1 except for
// subclasses of ContentsScalingLayer.
float contents_scale_x() const { return draw_properties_.contents_scale_x; }
float contents_scale_y() const { return draw_properties_.contents_scale_y; }
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 1597d24..763a696 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -123,7 +123,7 @@ scoped_ptr<SharedQuadState> LayerImpl::CreateSharedQuadState() const {
void LayerImpl::WillDraw(ResourceProvider* resource_provider) {
#ifndef NDEBUG
- // willDraw/didDraw must be matched.
+ // WillDraw/DidDraw must be matched.
DCHECK(!between_will_draw_and_did_draw_);
between_will_draw_and_did_draw_ = true;
#endif
@@ -169,10 +169,10 @@ void LayerImpl::AppendDebugBorderQuad(
GetDebugBorderProperties(&color, &width);
gfx::Rect content_rect(content_bounds());
- scoped_ptr<DebugBorderDrawQuad> debugBorderQuad =
+ scoped_ptr<DebugBorderDrawQuad> debug_border_quad =
DebugBorderDrawQuad::Create();
- debugBorderQuad->SetNew(shared_quad_state, content_rect, color, width);
- quad_sink->Append(debugBorderQuad.PassAs<DrawQuad>(), append_quads_data);
+ debug_border_quad->SetNew(shared_quad_state, content_rect, color, width);
+ quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), append_quads_data);
}
bool LayerImpl::HasDelegatedContent() const {
@@ -224,12 +224,12 @@ InputHandlerClient::ScrollStatus LayerImpl::TryScroll(
gfx::PointF screen_space_point,
InputHandlerClient::ScrollInputType type) const {
if (should_scroll_on_main_thread()) {
- TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed shouldScrollOnMainThread");
+ TRACE_EVENT0("cc", "LayerImpl::TryScroll: Failed ShouldScrollOnMainThread");
return InputHandlerClient::ScrollOnMainThread;
}
if (!screen_space_transform().IsInvertible()) {
- TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored nonInvertibleTransform");
+ TRACE_EVENT0("cc", "LayerImpl::TryScroll: Ignored NonInvertibleTransform");
return InputHandlerClient::ScrollIgnored;
}
@@ -255,13 +255,13 @@ InputHandlerClient::ScrollStatus LayerImpl::TryScroll(
non_fast_scrollable_region().Contains(
gfx::ToRoundedPoint(hit_test_point_in_layer_space))) {
TRACE_EVENT0("cc",
- "LayerImpl::tryScroll: Failed nonFastScrollableRegion");
+ "LayerImpl::tryScroll: Failed NonFastScrollableRegion");
return InputHandlerClient::ScrollOnMainThread;
}
}
if (type == InputHandlerClient::Wheel && have_wheel_event_handlers()) {
- TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed wheelEventHandlers");
+ TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers");
return InputHandlerClient::ScrollOnMainThread;
}
@@ -349,7 +349,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
// If the main thread commits multiple times before the impl thread actually
// draws, then damage tracking will become incorrect if we simply clobber the
- // updateRect here. The LayerImpl's updateRect needs to accumulate (i.e.
+ // update_rect here. The LayerImpl's update_rect needs to accumulate (i.e.
// union) any update changes that have occurred on the main thread.
update_rect_.Union(layer->update_rect());
layer->set_update_rect(update_rect_);
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 8b09e2e..f33e644 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -94,10 +94,10 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; }
scoped_ptr<SharedQuadState> CreateSharedQuadState() const;
- // willDraw must be called before appendQuads. If willDraw is called,
- // didDraw is guaranteed to be called before another willDraw or before
+ // WillDraw must be called before AppendQuads. If WillDraw is called,
+ // DidDraw is guaranteed to be called before another WillDraw or before
// the layer is destroyed. To enforce this, any class that overrides
- // willDraw/didDraw must call the base class version.
+ // WillDraw/DqidDraw must call the base class version.
virtual void WillDraw(ResourceProvider* resource_provider);
virtual void AppendQuads(QuadSink* quad_sink,
AppendQuadsData* append_quads_data) {}
@@ -189,7 +189,7 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
bool ShowDebugBorders() const;
// These invalidate the host's render surface layer list. The caller
- // is responsible for calling setNeedsUpdateDrawProperties on the host
+ // is responsible for calling set_needs_update_draw_properties on the tree
// so that its list can be recreated.
void CreateRenderSurface();
void ClearRenderSurface() { draw_properties_.render_surface.reset(); }
@@ -245,8 +245,8 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
return draw_properties_.render_surface.get();
}
- // The client should be responsible for setting bounds, contentBounds and
- // contentsScale to appropriate values. LayerImpl doesn't calculate any of
+ // The client should be responsible for setting bounds, content bounds and
+ // contents scale to appropriate values. LayerImpl doesn't calculate any of
// them from the other values.
void SetBounds(gfx::Size bounds);
@@ -263,7 +263,7 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
bool animating_transform_to_screen,
float* contents_scale_x,
float* contents_scale_y,
- gfx::Size* contentBounds);
+ gfx::Size* content_bounds);
void SetScrollOffset(gfx::Vector2d scroll_offset);
gfx::Vector2d scroll_offset() const { return scroll_offset_; }
@@ -455,7 +455,7 @@ class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
// Indicates that a property has changed on this layer that would not
// affect the pixels on its target surface, but would require redrawing
- // the targetSurface onto its ancestor targetSurface.
+ // the target_surface onto its ancestor target_surface.
// For layers that do not own a surface this flag acts as
// layer_property_changed_.
bool layer_surface_property_changed_;
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index fb3bb28..cb65d76 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -155,7 +155,7 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
EXPECT_TRUE(child->LayerPropertyChanged());
EXPECT_TRUE(grand_child->LayerPropertyChanged());
- // Special case: check that setBounds changes behavior depending on
+ // Special case: check that SetBounds changes behavior depending on
// masksToBounds.
root->SetMasksToBounds(false);
EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetBounds(gfx::Size(135, 246)));
diff --git a/cc/layers/layer_iterator.cc b/cc/layers/layer_iterator.cc
index 02634bd..5891168 100644
--- a/cc/layers/layer_iterator.cc
+++ b/cc/layers/layer_iterator.cc
@@ -44,7 +44,7 @@ void LayerIteratorActions::BackToFront::Next(
// If the current layer has a RS, move to its layer list. Otherwise,
// visit the next layer in the current RS layer list.
if (it->current_layer_represents_contributing_render_surface()) {
- // Save our position in the childLayer list for the RenderSurface,
+ // Save our position in the child_layers list for the RenderSurface,
// then jump to the next RenderSurface. Save where we
// came from in the next RenderSurface so we can get back to it.
it->target_render_surface()->current_layer_index_history_ =
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index c0fa5d9..8a93c52 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -26,15 +26,15 @@ using ::testing::Mock;
using ::testing::StrictMock;
using ::testing::_;
-#define EXPECT_SET_NEEDS_COMMIT(expect, codeToTest) do { \
+#define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) do { \
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \
- codeToTest; \
+ code_to_test; \
Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
} while (false)
-#define EXPECT_SET_NEEDS_FULL_TREE_SYNC(expect, codeToTest) do { \
+#define EXPECT_SET_NEEDS_FULL_TREE_SYNC(expect, code_to_test) do { \
EXPECT_CALL(*layer_tree_host_, SetNeedsFullTreeSync()).Times((expect)); \
- codeToTest; \
+ code_to_test; \
Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
} while (false)
@@ -392,9 +392,9 @@ TEST_F(LayerTest, SetChildren) {
scoped_refptr<Layer> child1 = Layer::Create();
scoped_refptr<Layer> child2 = Layer::Create();
- std::vector<scoped_refptr<Layer> > newChildren;
- newChildren.push_back(child1);
- newChildren.push_back(child2);
+ std::vector<scoped_refptr<Layer> > new_children;
+ new_children.push_back(child1);
+ new_children.push_back(child2);
// Set up and verify initial test conditions: child1 has a parent, child2 has
// no parent.
@@ -406,7 +406,7 @@ TEST_F(LayerTest, SetChildren) {
new_parent->SetLayerTreeHost(layer_tree_host_.get());
EXPECT_SET_NEEDS_FULL_TREE_SYNC(
- AtLeast(1), new_parent->SetChildren(newChildren));
+ AtLeast(1), new_parent->SetChildren(new_children));
ASSERT_EQ(2U, new_parent->children().size());
EXPECT_EQ(new_parent.get(), child1->parent());
@@ -471,7 +471,7 @@ TEST_F(LayerTest, GetRootLayerAfterTreeManipulations) {
}
TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
- // The semantics for setNeedsDisplay which are tested here:
+ // The semantics for SetNeedsDisplay which are tested here:
// 1. sets NeedsDisplay flag appropriately.
// 2. indirectly calls SetNeedsCommit, exactly once for each call to
// SetNeedsDisplay.
@@ -566,7 +566,7 @@ TEST_F(LayerTest, CheckPropertyChangeCausesCorrectBehavior) {
EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer(
dummy_layer2.get()));
- // The above tests should not have caused a change to the needsDisplay flag.
+ // The above tests should not have caused a change to the needs_display flag.
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
// As layers are removed from the tree, they will cause a tree sync.
@@ -587,7 +587,7 @@ TEST_F(LayerTest, SetBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds) {
test_layer->ResetNeedsDisplayForTesting();
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
- // Calling setBounds only invalidates on the first time.
+ // Calling SetBounds only invalidates on the first time.
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBounds(gfx::Size(7, 10)));
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
}
diff --git a/cc/layers/nine_patch_layer.cc b/cc/layers/nine_patch_layer.cc
index a4b4f70..4301a85 100644
--- a/cc/layers/nine_patch_layer.cc
+++ b/cc/layers/nine_patch_layer.cc
@@ -63,12 +63,12 @@ void NinePatchLayer::Update(ResourceUpdateQueue* queue,
if (resource_ &&
(bitmap_dirty_ || resource_->texture()->resource_id() == 0)) {
- gfx::Rect contentRect(gfx::Point(),
- gfx::Size(bitmap_.width(), bitmap_.height()));
+ gfx::Rect content_rect(gfx::Point(),
+ gfx::Size(bitmap_.width(), bitmap_.height()));
ResourceUpdate upload = ResourceUpdate::Create(resource_->texture(),
&bitmap_,
- contentRect,
- contentRect,
+ content_rect,
+ content_rect,
gfx::Vector2d());
queue->AppendFullUpload(upload);
bitmap_dirty_ = false;
diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc
index 53daedc..69432bf 100644
--- a/cc/layers/nine_patch_layer_impl.cc
+++ b/cc/layers/nine_patch_layer_impl.cc
@@ -102,16 +102,16 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
// Patch positions in layer space
gfx::Rect top_left(0, 0, left_width, top_height);
- gfx::Rect topRight(
+ gfx::Rect top_right(
bounds().width() - right_width, 0, right_width, top_height);
- gfx::Rect bottomLeft(
+ gfx::Rect bottom_left(
0, bounds().height() - bottom_height, left_width, bottom_height);
- gfx::Rect bottomRight(
- topRight.x(), bottomLeft.y(), right_width, bottom_height);
+ gfx::Rect bottom_right(
+ top_right.x(), bottom_left.y(), right_width, bottom_height);
gfx::Rect top(top_left.right(), 0, middle_width, top_height);
gfx::Rect left(0, top_left.bottom(), left_width, middle_height);
- gfx::Rect right(topRight.x(), topRight.bottom(), right_width, left.height());
- gfx::Rect bottom(top.x(), bottomLeft.y(), top.width(), bottom_height);
+ gfx::Rect right(top_right.x(), top_right.bottom(), right_width, left.height());
+ gfx::Rect bottom(top.x(), bottom_left.y(), top.width(), bottom_height);
float img_width = image_bounds_.width();
float img_height = image_bounds_.height();
@@ -141,21 +141,21 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
bottom_height,
img_width,
img_height);
- gfx::RectF uvTop(uv_top_left.right(),
+ gfx::RectF uv_top(uv_top_left.right(),
0,
(img_width - left_width - right_width) / img_width,
(top_height) / img_height);
- gfx::RectF uvLeft(0,
+ gfx::RectF uv_left(0,
uv_top_left.bottom(),
left_width / img_width,
(img_height - top_height - bottom_height) / img_height);
- gfx::RectF uvRight(uv_top_right.x(),
+ gfx::RectF uv_right(uv_top_right.x(),
uv_top_right.bottom(),
right_width / img_width,
- uvLeft.height());
- gfx::RectF uvBottom(uvTop.x(),
+ uv_left.height());
+ gfx::RectF uv_bottom(uv_top.x(),
uv_bottom_left.y(),
- uvTop.width(),
+ uv_top.width(),
bottom_height / img_height);
// Nothing is opaque here.
@@ -177,7 +177,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
quad = TextureDrawQuad::Create();
quad->SetNew(shared_quad_state,
- topRight,
+ top_right,
opaque_rect,
resource_id_,
premultiplied_alpha,
@@ -188,7 +188,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
quad = TextureDrawQuad::Create();
quad->SetNew(shared_quad_state,
- bottomLeft,
+ bottom_left,
opaque_rect,
resource_id_,
premultiplied_alpha,
@@ -200,7 +200,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
quad = TextureDrawQuad::Create();
quad->SetNew(shared_quad_state,
- bottomRight,
+ bottom_right,
opaque_rect,
resource_id_,
premultiplied_alpha,
@@ -216,8 +216,8 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
opaque_rect,
resource_id_,
premultiplied_alpha,
- uvTop.origin(),
- uvTop.bottom_right(),
+ uv_top.origin(),
+ uv_top.bottom_right(),
vertex_opacity,
flipped);
quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
@@ -228,8 +228,8 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
opaque_rect,
resource_id_,
premultiplied_alpha,
- uvLeft.origin(),
- uvLeft.bottom_right(),
+ uv_left.origin(),
+ uv_left.bottom_right(),
vertex_opacity,
flipped);
quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
@@ -240,8 +240,8 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
opaque_rect,
resource_id_,
premultiplied_alpha,
- uvRight.origin(),
- uvRight.bottom_right(),
+ uv_right.origin(),
+ uv_right.bottom_right(),
vertex_opacity,
flipped);
quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
@@ -252,8 +252,8 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
opaque_rect,
resource_id_,
premultiplied_alpha,
- uvBottom.origin(),
- uvBottom.bottom_right(),
+ uv_bottom.origin(),
+ uv_bottom.bottom_right(),
vertex_opacity,
flipped);
quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
diff --git a/cc/layers/picture_image_layer_impl.cc b/cc/layers/picture_image_layer_impl.cc
index 9c478f0..9fa401f 100644
--- a/cc/layers/picture_image_layer_impl.cc
+++ b/cc/layers/picture_image_layer_impl.cc
@@ -9,8 +9,8 @@
namespace cc {
-PictureImageLayerImpl::PictureImageLayerImpl(LayerTreeImpl* treeImpl, int id)
- : PictureLayerImpl(treeImpl, id) {
+PictureImageLayerImpl::PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id)
+ : PictureLayerImpl(tree_impl, id) {
}
PictureImageLayerImpl::~PictureImageLayerImpl() {
@@ -21,8 +21,8 @@ const char* PictureImageLayerImpl::LayerTypeAsString() const {
}
scoped_ptr<LayerImpl> PictureImageLayerImpl::CreateLayerImpl(
- LayerTreeImpl* treeImpl) {
- return PictureImageLayerImpl::Create(treeImpl, id()).PassAs<LayerImpl>();
+ LayerTreeImpl* tree_impl) {
+ return PictureImageLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
void PictureImageLayerImpl::GetDebugBorderProperties(
diff --git a/cc/layers/picture_image_layer_impl.h b/cc/layers/picture_image_layer_impl.h
index 9c3f46d..4bbafa7f22 100644
--- a/cc/layers/picture_image_layer_impl.h
+++ b/cc/layers/picture_image_layer_impl.h
@@ -11,18 +11,18 @@ namespace cc {
class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl {
public:
- static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* treeImpl,
+ static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl,
int id) {
- return make_scoped_ptr(new PictureImageLayerImpl(treeImpl, id));
+ return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id));
}
virtual ~PictureImageLayerImpl();
virtual const char* LayerTypeAsString() const OVERRIDE;
virtual scoped_ptr<LayerImpl> CreateLayerImpl(
- LayerTreeImpl* treeImpl) OVERRIDE;
+ LayerTreeImpl* tree_impl) OVERRIDE;
protected:
- PictureImageLayerImpl(LayerTreeImpl* treeImpl, int id);
+ PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id);
virtual void CalculateRasterContentsScale(
bool animating_transform_to_screen,
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 0e289d4..1225772 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -84,14 +84,14 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
}
-void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
- AppendQuadsData* appendQuadsData) {
+void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
+ AppendQuadsData* append_quads_data) {
const gfx::Rect& rect = visible_content_rect();
gfx::Rect content_rect(content_bounds());
- SharedQuadState* sharedQuadState =
- quadSink->UseSharedQuadState(CreateSharedQuadState());
- AppendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
+ SharedQuadState* shared_quad_state =
+ quad_sink->UseSharedQuadState(CreateSharedQuadState());
+ AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
bool clipped = false;
gfx::QuadF target_quad = MathUtil::MapQuad(
@@ -131,11 +131,12 @@ void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
width = DebugColors::MissingTileBorderWidth(layer_tree_impl());
}
- scoped_ptr<DebugBorderDrawQuad> debugBorderQuad =
+ scoped_ptr<DebugBorderDrawQuad> debug_border_quad =
DebugBorderDrawQuad::Create();
gfx::Rect geometry_rect = iter.geometry_rect();
- debugBorderQuad->SetNew(sharedQuadState, geometry_rect, color, width);
- quadSink->Append(debugBorderQuad.PassAs<DrawQuad>(), appendQuadsData);
+ debug_border_quad->SetNew(shared_quad_state, geometry_rect, color, width);
+ quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(),
+ append_quads_data);
}
}
@@ -156,17 +157,17 @@ void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
// TODO(enne): Figure out how to show debug "invalidated checker" color
scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create();
SkColor color = DebugColors::DefaultCheckerboardColor();
- quad->SetNew(sharedQuadState, geometry_rect, color);
- if (quadSink->Append(quad.PassAs<DrawQuad>(), appendQuadsData))
- appendQuadsData->numMissingTiles++;
+ quad->SetNew(shared_quad_state, geometry_rect, color);
+ if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data))
+ append_quads_data->numMissingTiles++;
} else {
scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
- quad->SetNew(sharedQuadState, geometry_rect, background_color());
- if (quadSink->Append(quad.PassAs<DrawQuad>(), appendQuadsData))
- appendQuadsData->numMissingTiles++;
+ quad->SetNew(shared_quad_state, geometry_rect, background_color());
+ if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data))
+ append_quads_data->numMissingTiles++;
}
- appendQuadsData->hadIncompleteTile = true;
+ append_quads_data->hadIncompleteTile = true;
continue;
}
@@ -174,29 +175,29 @@ void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
switch (drawing_info.mode()) {
case ManagedTileState::DrawingInfo::TEXTURE_MODE: {
if (iter->contents_scale() != ideal_contents_scale_)
- appendQuadsData->hadIncompleteTile = true;
+ append_quads_data->hadIncompleteTile = true;
gfx::RectF texture_rect = iter.texture_rect();
gfx::Rect opaque_rect = iter->opaque_rect();
opaque_rect.Intersect(content_rect);
scoped_ptr<TileDrawQuad> quad = TileDrawQuad::Create();
- quad->SetNew(sharedQuadState,
+ quad->SetNew(shared_quad_state,
geometry_rect,
opaque_rect,
drawing_info.get_resource_id(),
texture_rect,
iter.texture_size(),
drawing_info.contents_swizzled());
- quadSink->Append(quad.PassAs<DrawQuad>(), appendQuadsData);
+ quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
break;
}
case ManagedTileState::DrawingInfo::SOLID_COLOR_MODE: {
scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
- quad->SetNew(sharedQuadState,
+ quad->SetNew(shared_quad_state,
geometry_rect,
drawing_info.get_solid_color());
- quadSink->Append(quad.PassAs<DrawQuad>(), appendQuadsData);
+ quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
break;
}
case ManagedTileState::DrawingInfo::TRANSPARENT_MODE:
@@ -213,7 +214,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
// Aggressively remove any tilings that are not seen to save memory. Note
// that this is at the expense of doing cause more frequent re-painting. A
- // better scheme would be to maintain a tighter visibleContentRect for the
+ // better scheme would be to maintain a tighter visible_content_rect for the
// finer tilings.
CleanUpTilingsOnActiveLayer(seen_tilings);
}
@@ -379,7 +380,7 @@ gfx::Size PictureLayerImpl::CalculateTileSize(
// of different textures sizes to help recycling, and also keeps all
// textures multiple-of-eight, which is preferred on some drivers (IMG).
bool avoid_pow2 =
- layer_tree_impl()->rendererCapabilities().avoid_pow2_textures;
+ layer_tree_impl()->GetRendererCapabilities().avoid_pow2_textures;
int round_up_to = avoid_pow2 ? 56 : 64;
width = RoundUp(width, round_up_to);
height = RoundUp(height, round_up_to);
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 7a7e98e..063b632 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -138,7 +138,7 @@ class MockCanvas : public SkCanvas {
explicit MockCanvas(SkDevice* device) : SkCanvas(device) {}
virtual void drawRect(const SkRect& rect, const SkPaint& paint) OVERRIDE {
- // Capture calls before SkCanvas quickReject kicks in
+ // Capture calls before SkCanvas quickReject() kicks in.
rects_.push_back(rect);
}
@@ -254,13 +254,13 @@ class PictureLayerImplTest : public testing::Test {
SkBitmap store;
store.setConfig(SkBitmap::kNo_Config, 1000, 1000);
SkDevice device(store);
- int64 pixelsRasterized;
+ int64 pixels_rasterized;
std::vector<SkRect>::const_iterator rect_iter = rects.begin();
for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) {
MockCanvas mock_canvas(&device);
active_pile->Raster(&mock_canvas, (*tile_iter)->content_rect(),
- 1.0f, &pixelsRasterized);
+ 1.0f, &pixels_rasterized);
// This test verifies that when drawing the contents of a specific tile
// at content scale 1.0, the playback canvas never receives content from
@@ -283,17 +283,17 @@ class PictureLayerImplTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(PictureLayerImplTest);
};
-TEST_F(PictureLayerImplTest, tileGridAlignment) {
+TEST_F(PictureLayerImplTest, TileGridAlignment) {
host_impl_.SetDeviceScaleFactor(1.f);
TestTileGridAlignmentCommon();
}
-TEST_F(PictureLayerImplTest, tileGridAlignmentHiDPI) {
+TEST_F(PictureLayerImplTest, TileGridAlignmentHiDPI) {
host_impl_.SetDeviceScaleFactor(2.f);
TestTileGridAlignmentCommon();
}
-TEST_F(PictureLayerImplTest, cloneNoInvalidation) {
+TEST_F(PictureLayerImplTest, CloneNoInvalidation) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(400, 400);
@@ -316,7 +316,7 @@ TEST_F(PictureLayerImplTest, cloneNoInvalidation) {
VerifyAllTilesExistAndHavePile(tilings.tiling_at(i), active_pile.get());
}
-TEST_F(PictureLayerImplTest, clonePartialInvalidation) {
+TEST_F(PictureLayerImplTest, ClonePartialInvalidation) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(400, 400);
gfx::Rect layer_invalidation(150, 200, 30, 180);
@@ -354,7 +354,7 @@ TEST_F(PictureLayerImplTest, clonePartialInvalidation) {
}
}
-TEST_F(PictureLayerImplTest, cloneFullInvalidation) {
+TEST_F(PictureLayerImplTest, CloneFullInvalidation) {
gfx::Size tile_size(90, 80);
gfx::Size layer_bounds(300, 500);
@@ -377,7 +377,7 @@ TEST_F(PictureLayerImplTest, cloneFullInvalidation) {
VerifyAllTilesExistAndHavePile(tilings.tiling_at(i), pending_pile.get());
}
-TEST_F(PictureLayerImplTest, noInvalidationBoundsChange) {
+TEST_F(PictureLayerImplTest, NoInvalidationBoundsChange) {
gfx::Size tile_size(90, 80);
gfx::Size active_layer_bounds(300, 500);
gfx::Size pending_layer_bounds(400, 800);
@@ -418,7 +418,7 @@ TEST_F(PictureLayerImplTest, noInvalidationBoundsChange) {
}
}
-TEST_F(PictureLayerImplTest, addTilesFromNewRecording) {
+TEST_F(PictureLayerImplTest, AddTilesFromNewRecording) {
gfx::Size tile_size(400, 400);
gfx::Size layer_bounds(1300, 1900);
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc
index b437b2c..741526a 100644
--- a/cc/layers/render_surface_impl.cc
+++ b/cc/layers/render_surface_impl.cc
@@ -105,7 +105,7 @@ void RenderSurfaceImpl::DumpSurface(std::string* str, int indent) const {
str->append(indent_str);
base::StringAppendF(str,
- "damageRect is pos(%f, %f), size(%f, %f)\n",
+ "current_damage_rect is pos(%f, %f), size(%f, %f)\n",
damage_tracker_->current_damage_rect().x(),
damage_tracker_->current_damage_rect().y(),
damage_tracker_->current_damage_rect().width(),
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc
index ec47b84..8720fb0 100644
--- a/cc/layers/render_surface_unittest.cc
+++ b/cc/layers/render_surface_unittest.cc
@@ -20,14 +20,14 @@
namespace cc {
namespace {
-#define EXECUTE_AND_VERIFY_SURFACE_CHANGED(codeToTest) \
+#define EXECUTE_AND_VERIFY_SURFACE_CHANGED(code_to_test) \
render_surface->ResetPropertyChangedFlag(); \
- codeToTest; \
+ code_to_test; \
EXPECT_TRUE(render_surface->SurfacePropertyChanged())
-#define EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(codeToTest) \
+#define EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(code_to_test) \
render_surface->ResetPropertyChangedFlag(); \
- codeToTest; \
+ code_to_test; \
EXPECT_FALSE(render_surface->SurfacePropertyChanged())
TEST(RenderSurfaceTest, VerifySurfaceChangesAreTrackedProperly) {
diff --git a/cc/layers/scrollbar_geometry_fixed_thumb.cc b/cc/layers/scrollbar_geometry_fixed_thumb.cc
index aaca66e..66dd293 100644
--- a/cc/layers/scrollbar_geometry_fixed_thumb.cc
+++ b/cc/layers/scrollbar_geometry_fixed_thumb.cc
@@ -54,14 +54,14 @@ void ScrollbarGeometryFixedThumb::splitTrack(
WebRect& before_thumb_rect,
WebRect& thumb_rect,
WebRect& after_thumb_rect) {
- // This is a reimplementation of ScrollbarThemeComposite::splitTrack.
+ // This is a reimplementation of ScrollbarThemeComposite::splitTrack().
// Because the WebScrollbarThemeGeometry functions call down to native
// ScrollbarThemeComposite code which uses ScrollbarThemeComposite virtual
- // helpers, there's no way to override a helper like thumbLength from
+ // helpers, there's no way to override a helper like thumbLength() from
// the WebScrollbarThemeGeometry level. So, these three functions
- // (splitTrack, thumb_position, thumbLength) are copied here so that the
- // WebScrollbarThemeGeometry helper functions are used instead and
- // a fixed size thumbLength can be used.
+ // (splitTrack(), thumbPosition(), thumbLength()) are copied here so that
+ // the WebScrollbarThemeGeometry helper functions are used instead and
+ // a fixed size thumbLength() can be used.
WebRect track_rect =
constrainTrackRectToTrackPieces(scrollbar, unconstrained_track_rect);
diff --git a/cc/layers/scrollbar_layer.cc b/cc/layers/scrollbar_layer.cc
index 0570e22..7dac99e 100644
--- a/cc/layers/scrollbar_layer.cc
+++ b/cc/layers/scrollbar_layer.cc
@@ -30,22 +30,22 @@ scoped_refptr<ScrollbarLayer> ScrollbarLayer::Create(
scoped_ptr<WebKit::WebScrollbar> scrollbar,
scoped_ptr<ScrollbarThemePainter> painter,
scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry,
- int scrollLayerId) {
+ int scroll_layer_id) {
return make_scoped_refptr(new ScrollbarLayer(scrollbar.Pass(),
painter.Pass(),
geometry.Pass(),
- scrollLayerId));
+ scroll_layer_id));
}
ScrollbarLayer::ScrollbarLayer(
scoped_ptr<WebKit::WebScrollbar> scrollbar,
scoped_ptr<ScrollbarThemePainter> painter,
scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry,
- int scrollLayerId)
+ int scroll_layer_id)
: scrollbar_(scrollbar.Pass()),
painter_(painter.Pass()),
geometry_(geometry.Pass()),
- scroll_layer_id_(scrollLayerId),
+ scroll_layer_id_(scroll_layer_id),
texture_format_(GL_INVALID_ENUM) {
if (!scrollbar_->isOverlay())
SetShouldScrollOnMainThread(true);
@@ -96,15 +96,15 @@ void ScrollbarLayer::CalculateContentsScale(float ideal_contents_scale,
bool animating_transform_to_screen,
float* contents_scale_x,
float* contents_scale_y,
- gfx::Size* contentBounds) {
+ gfx::Size* content_bounds) {
ContentsScalingLayer::CalculateContentsScale(
ClampScaleToMaxTextureSize(ideal_contents_scale),
animating_transform_to_screen,
contents_scale_x,
contents_scale_y,
- contentBounds);
- DCHECK_LE(contentBounds->width(), MaxTextureSize());
- DCHECK_LE(contentBounds->height(), MaxTextureSize());
+ content_bounds);
+ DCHECK_LE(content_bounds->width(), MaxTextureSize());
+ DCHECK_LE(content_bounds->height(), MaxTextureSize());
}
void ScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
@@ -134,7 +134,7 @@ void ScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
else
scrollbar_layer->set_thumb_resource_id(0);
- // Pinch zoom scrollbarLayerImpl does not get its scroll_layer_id_
+ // Pinch zoom ScrollbarLayerImpl does not get its scroll_layer_id_
// set in LayerImpl, so we need to push it here.
if (scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID)
scrollbar_layer->set_scroll_layer_id(scroll_layer_id_);
@@ -338,7 +338,7 @@ void ScrollbarLayer::UpdatePart(CachingBitmapContentLayerUpdater* painter,
if (!painter->pixels_did_change() &&
resource->texture()->have_backing_texture()) {
TRACE_EVENT_INSTANT0("cc",
- "ScrollbarLayer::updatePart no texture upload needed");
+ "ScrollbarLayer::UpdatePart no texture upload needed");
return;
}
diff --git a/cc/layers/scrollbar_layer.h b/cc/layers/scrollbar_layer.h
index eafdde8..db97272 100644
--- a/cc/layers/scrollbar_layer.h
+++ b/cc/layers/scrollbar_layer.h
@@ -24,10 +24,10 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
OVERRIDE;
static scoped_refptr<ScrollbarLayer> Create(
- scoped_ptr<WebKit::WebScrollbar>,
- scoped_ptr<ScrollbarThemePainter>,
- scoped_ptr<WebKit::WebScrollbarThemeGeometry>,
- int scrollLayerId);
+ scoped_ptr<WebKit::WebScrollbar> scrollbar,
+ scoped_ptr<ScrollbarThemePainter> painter,
+ scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry,
+ int scroll_layer_id);
int scroll_layer_id() const { return scroll_layer_id_; }
void SetScrollLayerId(int id);
@@ -48,16 +48,16 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
bool animating_transform_to_screen,
float* contents_scale_x,
float* contents_scale_y,
- gfx::Size* contentBounds) OVERRIDE;
+ gfx::Size* content_bounds) OVERRIDE;
virtual ScrollbarLayer* ToScrollbarLayer() OVERRIDE;
protected:
ScrollbarLayer(
- scoped_ptr<WebKit::WebScrollbar>,
- scoped_ptr<ScrollbarThemePainter>,
- scoped_ptr<WebKit::WebScrollbarThemeGeometry>,
- int scrollLayerId);
+ scoped_ptr<WebKit::WebScrollbar> scrollbar,
+ scoped_ptr<ScrollbarThemePainter> painter,
+ scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry,
+ int scroll_layer_id);
virtual ~ScrollbarLayer();
private:
diff --git a/cc/layers/scrollbar_layer_impl.cc b/cc/layers/scrollbar_layer_impl.cc
index 4e2d08c..c376449 100644
--- a/cc/layers/scrollbar_layer_impl.cc
+++ b/cc/layers/scrollbar_layer_impl.cc
@@ -151,8 +151,8 @@ void ScrollbarLayerImpl::AppendQuads(QuadSink* quad_sink,
bool flipped = false;
gfx::PointF uv_top_left(0.f, 0.f);
gfx::PointF uv_bottom_right(1.f, 1.f);
- gfx::Rect boundsRect(bounds());
- gfx::Rect contentBoundsRect(content_bounds());
+ gfx::Rect bounds_rect(bounds());
+ gfx::Rect content_bounds_rect(content_bounds());
SharedQuadState* shared_quad_state =
quad_sink->UseSharedQuadState(CreateSharedQuadState());
@@ -191,12 +191,12 @@ void ScrollbarLayerImpl::AppendQuads(QuadSink* quad_sink,
return;
}
- WebRect thumb_rect, back_track_rect, foreTrackRect;
+ WebRect thumb_rect, back_track_rect, fore_track_rect;
geometry_->splitTrack(&scrollbar_,
geometry_->trackRect(&scrollbar_),
back_track_rect,
thumb_rect,
- foreTrackRect);
+ fore_track_rect);
if (!geometry_->hasThumb(&scrollbar_))
thumb_rect = WebRect();
@@ -222,11 +222,11 @@ void ScrollbarLayerImpl::AppendQuads(QuadSink* quad_sink,
// We only paint the track in two parts if we were given a texture for the
// forward track part.
- if (fore_track_resource_id_ && !foreTrackRect.isEmpty()) {
+ if (fore_track_resource_id_ && !fore_track_rect.isEmpty()) {
gfx::Rect quad_rect(ScrollbarLayerRectToContentRect(
- gfx::Rect(foreTrackRect)));
+ gfx::Rect(fore_track_rect)));
gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
- gfx::RectF uv_rect(ToUVRect(foreTrackRect, boundsRect));
+ gfx::RectF uv_rect(ToUVRect(fore_track_rect, bounds_rect));
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
quad->SetNew(shared_quad_state,
@@ -244,8 +244,8 @@ void ScrollbarLayerImpl::AppendQuads(QuadSink* quad_sink,
// Order matters here: since the back track texture is being drawn to the
// entire contents rect, we must append it after the thumb and fore track
// quads. The back track texture contains (and displays) the buttons.
- if (!contentBoundsRect.IsEmpty()) {
- gfx::Rect quad_rect(contentBoundsRect);
+ if (!content_bounds_rect.IsEmpty()) {
+ gfx::Rect quad_rect(content_bounds_rect);
gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
const float opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index aca731d..423776d 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -91,7 +91,7 @@ TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
// Create and attach a non-overlay scrollbar.
scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
- static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(false);
+ static_cast<FakeWebScrollbar*>(scrollbar.get())->set_overlay(false);
scoped_ptr<LayerImpl> layer_impl_tree_root =
LayerImplForScrollAreaAndScrollbar(&host_impl, scrollbar.Pass(), false);
ScrollbarLayerImpl* scrollbar_layer_impl =
@@ -106,7 +106,7 @@ TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
// Create and attach an overlay scrollbar.
scrollbar = FakeWebScrollbar::Create();
- static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(true);
+ static_cast<FakeWebScrollbar*>(scrollbar.get())->set_overlay(true);
layer_impl_tree_root =
LayerImplForScrollAreaAndScrollbar(&host_impl, scrollbar.Pass(), false);
@@ -190,7 +190,7 @@ TEST(ScrollbarLayerTest, SolidColorDrawQuads) {
FakeLayerTreeHostImpl host_impl(layer_tree_settings, &proxy);
scoped_ptr<WebKit::WebScrollbar> scrollbar(FakeWebScrollbar::Create());
- static_cast<FakeWebScrollbar*>(scrollbar.get())->setOverlay(true);
+ static_cast<FakeWebScrollbar*>(scrollbar.get())->set_overlay(true);
scoped_ptr<LayerImpl> layer_impl_tree_root =
LayerImplForScrollAreaAndScrollbar(&host_impl, scrollbar.Pass(), false);
ScrollbarLayerImpl* scrollbar_layer_impl =
diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc
index 114386e..87c2377 100644
--- a/cc/layers/solid_color_layer_impl.cc
+++ b/cc/layers/solid_color_layer_impl.cc
@@ -32,12 +32,12 @@ void SolidColorLayerImpl::AppendQuads(QuadSink* quad_sink,
int height = content_bounds().height();
for (int x = 0; x < width; x += tile_size_) {
for (int y = 0; y < height; y += tile_size_) {
- gfx::Rect solidTileRect(x,
+ gfx::Rect solid_tile_rect(x,
y,
std::min(width - x, tile_size_),
std::min(height - y, tile_size_));
scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
- quad->SetNew(shared_quad_state, solidTileRect, background_color());
+ quad->SetNew(shared_quad_state, solid_tile_rect, background_color());
quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
}
}
diff --git a/cc/layers/solid_color_layer_impl_unittest.cc b/cc/layers/solid_color_layer_impl_unittest.cc
index 0d9ac61..b95ca0c 100644
--- a/cc/layers/solid_color_layer_impl_unittest.cc
+++ b/cc/layers/solid_color_layer_impl_unittest.cc
@@ -109,9 +109,9 @@ TEST(SolidColorLayerImplTest, VerifyOpaqueRect) {
scoped_refptr<Layer> root = Layer::Create();
root->AddChild(layer);
- std::vector<scoped_refptr<Layer> > renderSurfaceLayerList;
+ std::vector<scoped_refptr<Layer> > render_surface_layer_list;
LayerTreeHostCommon::CalculateDrawProperties(
- root, gfx::Size(500, 500), 1, 1, 1024, false, &renderSurfaceLayerList);
+ root, gfx::Size(500, 500), 1, 1, 1024, false, &render_surface_layer_list);
EXPECT_FALSE(layer->contents_opaque());
layer->SetBackgroundColor(SkColorSetARGBInline(255, 10, 20, 30));
@@ -124,7 +124,7 @@ TEST(SolidColorLayerImplTest, VerifyOpaqueRect) {
// The impl layer should call itself opaque as well.
EXPECT_TRUE(layer_impl->contents_opaque());
- // Impl layer has 1 opacity, and the color is opaque, so the opaqueRect
+ // Impl layer has 1 opacity, and the color is opaque, so the opaque_rect
// should be the full tile.
layer_impl->draw_properties().opacity = 1;
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index f42c87a..47c92d8 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -323,7 +323,7 @@ class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest {
break;
case 2:
// Old mailbox was released, task was posted, but won't execute
- // until this didCommit returns.
+ // until this DidCommit returns.
// TODO(piman): fix this.
EXPECT_EQ(1, callback_count_);
layer_tree_host()->SetNeedsCommit();
@@ -337,7 +337,7 @@ class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest {
break;
case 4:
// Old mailbox was released, task was posted, but won't execute
- // until this didCommit returns.
+ // until this DidCommit returns.
// TODO(piman): fix this.
EXPECT_EQ(2, callback_count_);
layer_tree_host()->SetNeedsCommit();
@@ -350,7 +350,7 @@ class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest {
break;
case 6:
// Old mailbox was released, task was posted, but won't execute
- // until this didCommit returns.
+ // until this DidCommit returns.
// TODO(piman): fix this.
EXPECT_EQ(3, callback_count_);
layer_tree_host()->SetNeedsCommit();
@@ -398,9 +398,9 @@ TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
pending_layer = TextureLayerImpl::Create(host_impl_.pending_tree(), 1, true);
ASSERT_TRUE(pending_layer);
- scoped_ptr<LayerImpl> activeLayer(
+ scoped_ptr<LayerImpl> active_layer(
pending_layer->CreateLayerImpl(host_impl_.active_tree()));
- ASSERT_TRUE(activeLayer);
+ ASSERT_TRUE(active_layer);
pending_layer->SetTextureMailbox(test_data_.mailbox1_);
@@ -412,8 +412,8 @@ TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
// Test callback after activation.
- pending_layer->PushPropertiesTo(activeLayer.get());
- activeLayer->DidBecomeActive();
+ pending_layer->PushPropertiesTo(active_layer.get());
+ active_layer->DidBecomeActive();
EXPECT_CALL(test_data_.mock_callback_, Release(_, _)).Times(0);
pending_layer->SetTextureMailbox(test_data_.mailbox1_);
@@ -421,16 +421,16 @@ TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
EXPECT_CALL(test_data_.mock_callback_, Release(test_data_.mailbox_name2_, _))
.Times(1);
- pending_layer->PushPropertiesTo(activeLayer.get());
- activeLayer->DidBecomeActive();
+ pending_layer->PushPropertiesTo(active_layer.get());
+ active_layer->DidBecomeActive();
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
// Test resetting the mailbox.
EXPECT_CALL(test_data_.mock_callback_, Release(test_data_.mailbox_name1_, _))
.Times(1);
pending_layer->SetTextureMailbox(TextureMailbox());
- pending_layer->PushPropertiesTo(activeLayer.get());
- activeLayer->DidBecomeActive();
+ pending_layer->PushPropertiesTo(active_layer.get());
+ active_layer->DidBecomeActive();
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
// Test destructor.
diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc
index 0345cc0..e0f4da5 100644
--- a/cc/layers/tiled_layer_impl_unittest.cc
+++ b/cc/layers/tiled_layer_impl_unittest.cc
@@ -110,8 +110,8 @@ TEST_F(TiledLayerImplTest, EmptyQuadList) {
scoped_ptr<TiledLayerImpl> layer =
CreateLayer(tile_size, layer_size, LayerTilingData::NO_BORDER_TEXELS);
- gfx::Rect outsideBounds(gfx::Point(-100, -100), gfx::Size(50, 50));
- layer->draw_properties().visible_content_rect = outsideBounds;
+ gfx::Rect outside_bounds(gfx::Point(-100, -100), gfx::Size(50, 50));
+ layer->draw_properties().visible_content_rect = outside_bounds;
MockQuadCuller quad_culler;
AppendQuadsData data;
diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc
index 79d3f0b..e852bb1 100644
--- a/cc/layers/tiled_layer_unittest.cc
+++ b/cc/layers/tiled_layer_unittest.cc
@@ -763,7 +763,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) {
layer->SetContentBounds(content_bounds.size());
layer->draw_properties().visible_content_rect = content_bounds;
- // On first update, the updateRect includes all tiles, even beyond the
+ // On first update, the update_rect includes all tiles, even beyond the
// boundaries of the layer.
// However, it should still be in layer space, not content space.
layer->InvalidateContentRect(content_bounds);
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index 5efbd49..f47596b 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -86,11 +86,11 @@ void VideoLayerImpl::WillDraw(ResourceProvider* resource_provider) {
// Explicitly acquire and release the provider mutex so it can be held from
- // willDraw to didDraw. Since the compositor thread is in the middle of
- // drawing, the layer will not be destroyed before didDraw is called.
+ // WillDraw to DidDraw. Since the compositor thread is in the middle of
+ // drawing, the layer will not be destroyed before DidDraw is called.
// Therefore, the only thing that will prevent this lock from being released
// is the GPU process locking it. As the GPU process can't cause the
- // destruction of the provider (calling stopUsingProvider), holding this
+ // destruction of the provider (calling StopUsingProvider), holding this
// lock should not cause a deadlock.
frame_ = provider_client_impl_->AcquireLockAndCurrentFrame();