summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/animation/animation.cc20
-rw-r--r--cc/animation/animation.h4
-rw-r--r--cc/animation/layer_animation_controller.cc2
-rw-r--r--cc/animation/layer_animation_controller_unittest.cc6
-rw-r--r--cc/base/hash_pair.h38
-rw-r--r--cc/base/math_util.h14
-rw-r--r--cc/base/region_unittest.cc48
-rw-r--r--cc/base/scoped_ptr_hash_map.h8
-rw-r--r--cc/base/tiling_data.cc12
-rw-r--r--cc/debug/fake_web_graphics_context_3d.cc2
-rw-r--r--cc/debug/fake_web_graphics_context_3d.h22
-rw-r--r--cc/debug/frame_rate_counter.cc2
-rw-r--r--cc/debug/overdraw_metrics.cc6
-rw-r--r--cc/debug/rendering_stats.h2
-rw-r--r--cc/input/input_handler.h2
-rw-r--r--cc/input/top_controls_manager_unittest.cc14
-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
-rw-r--r--cc/output/delegating_renderer.cc40
-rw-r--r--cc/output/delegating_renderer_unittest.cc4
-rw-r--r--cc/output/direct_renderer.cc46
-rw-r--r--cc/output/gl_renderer.cc20
-rw-r--r--cc/output/gl_renderer.h2
-rw-r--r--cc/output/gl_renderer_pixeltest.cc2
-rw-r--r--cc/output/gl_renderer_unittest.cc48
-rw-r--r--cc/output/output_surface.cc10
-rw-r--r--cc/output/render_surface_filters.cc10
-rw-r--r--cc/output/software_output_device.cc4
-rw-r--r--cc/output/software_renderer.cc8
-rw-r--r--cc/output/software_renderer_unittest.cc8
-rw-r--r--cc/quads/draw_quad.h2
-rw-r--r--cc/quads/draw_quad_unittest.cc16
-rw-r--r--cc/quads/render_pass.h14
-rw-r--r--cc/quads/texture_draw_quad.cc36
-rw-r--r--cc/resources/bitmap_skpicture_content_layer_updater.h4
-rw-r--r--cc/resources/content_layer_updater.cc2
-rw-r--r--cc/resources/content_layer_updater.h2
-rw-r--r--cc/resources/picture.cc10
-rw-r--r--cc/resources/picture.h2
-rw-r--r--cc/resources/picture_pile_impl.cc6
-rw-r--r--cc/resources/picture_pile_impl.h2
-rw-r--r--cc/resources/prioritized_resource_manager.cc12
-rw-r--r--cc/resources/prioritized_resource_manager.h8
-rw-r--r--cc/resources/prioritized_resource_unittest.cc2
-rw-r--r--cc/resources/resource_provider_unittest.cc36
-rw-r--r--cc/resources/resource_update_controller.cc12
-rw-r--r--cc/resources/skpicture_content_layer_updater.cc10
-rw-r--r--cc/resources/tile_manager.h6
-rw-r--r--cc/scheduler/delay_based_time_source.cc36
-rw-r--r--cc/scheduler/frame_rate_controller_unittest.cc4
-rw-r--r--cc/scheduler/scheduler.cc10
-rw-r--r--cc/scheduler/scheduler_state_machine.h10
-rw-r--r--cc/scheduler/scheduler_state_machine_unittest.cc22
-rw-r--r--cc/scheduler/texture_uploader.cc10
-rw-r--r--cc/scheduler/texture_uploader.h2
-rw-r--r--cc/test/animation_test_common.cc30
-rw-r--r--cc/test/fake_proxy.h4
-rw-r--r--cc/test/fake_web_scrollbar.cc4
-rw-r--r--cc/test/fake_web_scrollbar.h2
-rw-r--r--cc/test/layer_tree_json_parser.cc6
-rw-r--r--cc/test/layer_tree_test.cc2
-rw-r--r--cc/test/layer_tree_test.h2
-rw-r--r--cc/test/render_pass_test_common.cc49
-rw-r--r--cc/test/render_pass_test_utils.cc75
-rw-r--r--cc/test/render_pass_test_utils.h20
-rw-r--r--cc/test/tiled_layer_test_common.h2
-rw-r--r--cc/trees/damage_tracker.cc10
-rw-r--r--cc/trees/damage_tracker_unittest.cc31
-rw-r--r--cc/trees/layer_sorter.cc18
-rw-r--r--cc/trees/layer_tree_host.cc2
-rw-r--r--cc/trees/layer_tree_host_common.cc92
-rw-r--r--cc/trees/layer_tree_host_common.h16
-rw-r--r--cc/trees/layer_tree_host_impl.cc24
-rw-r--r--cc/trees/layer_tree_host_impl.h14
-rw-r--r--cc/trees/layer_tree_host_unittest_occlusion.cc26
-rw-r--r--cc/trees/layer_tree_host_unittest_scroll.cc3
-rw-r--r--cc/trees/layer_tree_impl.cc10
-rw-r--r--cc/trees/layer_tree_impl.h8
-rw-r--r--cc/trees/occlusion_tracker.cc20
-rw-r--r--cc/trees/occlusion_tracker_unittest.cc8
-rw-r--r--cc/trees/proxy.h2
-rw-r--r--cc/trees/single_thread_proxy.cc30
-rw-r--r--cc/trees/thread_proxy.cc48
-rw-r--r--cc/trees/thread_proxy.h4
-rw-r--r--cc/trees/tree_synchronizer.cc2
115 files changed, 828 insertions, 819 deletions
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index d81713b..e0e7e7c 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -82,9 +82,9 @@ void Animation::SetRunState(RunState run_state, double monotonic_time) {
if (suspended_)
return;
- char nameBuffer[256];
- base::snprintf(nameBuffer,
- sizeof(nameBuffer),
+ char name_buffer[256];
+ base::snprintf(name_buffer,
+ sizeof(name_buffer),
"%s-%d%s",
s_targetPropertyNames[target_property_],
group_,
@@ -97,7 +97,7 @@ void Animation::SetRunState(RunState run_state, double monotonic_time) {
if (is_waiting_to_start && run_state == Running) {
TRACE_EVENT_ASYNC_BEGIN1(
- "cc", "Animation", this, "Name", TRACE_STR_COPY(nameBuffer));
+ "cc", "Animation", this, "Name", TRACE_STR_COPY(name_buffer));
}
bool was_finished = is_finished();
@@ -115,19 +115,19 @@ void Animation::SetRunState(RunState run_state, double monotonic_time) {
if (!was_finished && is_finished())
TRACE_EVENT_ASYNC_END0("cc", "Animation", this);
- char stateBuffer[256];
- base::snprintf(stateBuffer,
- sizeof(stateBuffer),
+ char state_buffer[256];
+ base::snprintf(state_buffer,
+ sizeof(state_buffer),
"%s->%s",
old_run_state_name,
new_run_state_name);
TRACE_EVENT_INSTANT2("cc",
- "LayerAnimationController::setRunState",
+ "LayerAnimationController::SetRunState",
"Name",
- TRACE_STR_COPY(nameBuffer),
+ TRACE_STR_COPY(name_buffer),
"State",
- TRACE_STR_COPY(stateBuffer));
+ TRACE_STR_COPY(state_buffer));
}
void Animation::Suspend(double monotonic_time) {
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index f1692ad..6a0f772 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -80,7 +80,7 @@ class CC_EXPORT Animation {
void Suspend(double monotonic_time);
void Resume(double monotonic_time);
- // If alternatesDirection is true, on odd numbered iterations we reverse the
+ // If alternates_direction is true, on odd numbered iterations we reverse the
// curve.
bool alternates_direction() const { return alternates_direction_; }
void set_alternates_direction(bool alternates) {
@@ -164,7 +164,7 @@ class CC_EXPORT Animation {
// purposes.
bool suspended_;
- // These are used in trimTimeToCurrentIteration to account for time
+ // These are used in TrimTimeToCurrentIteration to account for time
// spent while paused. This is not included in AnimationState since it
// there is absolutely no need for clients of this controller to know
// about these values.
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index ef280d6..5f7ad26 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -97,7 +97,7 @@ void LayerAnimationController::SuspendAnimations(double monotonic_time) {
}
// Looking at GraphicsLayerCA, this appears to be the analog to
-// suspendAnimations, which is for testing.
+// SuspendAnimations, which is for testing.
void LayerAnimationController::ResumeAnimations(double monotonic_time) {
for (size_t i = 0; i < active_animations_.size(); ++i) {
if (active_animations_[i]->run_state() == Animation::Paused)
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 48ce28b..4907de7 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -205,7 +205,7 @@ TEST(LayerAnimationControllerTest, TrivialTransition) {
controller->UpdateState(events.get());
EXPECT_TRUE(controller->HasActiveAnimation());
EXPECT_EQ(0.f, dummy.opacity());
- // A non-implOnly animation should not generate property updates.
+ // A non-impl-only animation should not generate property updates.
const AnimationEvent* event = GetMostRecentPropertyUpdateEvent(events.get());
EXPECT_FALSE(event);
controller->Animate(1.0);
@@ -852,7 +852,7 @@ TEST(LayerAnimationControllerTest, ForceSyncWhenSynchronizedStartTimeNeeded) {
active_animation->run_state());
}
-// Tests that skipping a call to updateState works as expected.
+// Tests that skipping a call to UpdateState works as expected.
TEST(LayerAnimationControllerTest, SkipUpdateState) {
scoped_ptr<AnimationEventsVector> events(
make_scoped_ptr(new AnimationEventsVector));
@@ -874,7 +874,7 @@ TEST(LayerAnimationControllerTest, SkipUpdateState) {
2,
Animation::Opacity));
- // Animate but don't updateState.
+ // Animate but don't UpdateState.
controller->Animate(1.0);
controller->Animate(2.0);
diff --git a/cc/base/hash_pair.h b/cc/base/hash_pair.h
index 6b6918d..e8602d2 100644
--- a/cc/base/hash_pair.h
+++ b/cc/base/hash_pair.h
@@ -40,7 +40,7 @@ namespace BASE_HASH_NAMESPACE {
// Theorem 4.3.3 of the thesis "Über die Komplexität der Multiplikation in
// eingeschränkten Branchingprogrammmodellen" by Woelfel, is:
//
-// h32(x32, y32) = (h64(x32, y32) * randOdd64 + rand16 * 2^16) % 2^64 / 2^32
+// h32(x32, y32) = (h64(x32, y32) * rand_odd64 + rand16 * 2^16) % 2^64 / 2^32
#define DEFINE_32BIT_PAIR_HASH(type1, type2) \
DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) { \
@@ -51,13 +51,13 @@ namespace BASE_HASH_NAMESPACE {
if (sizeof(std::size_t) >= sizeof(uint64)) \
return static_cast<std::size_t>(hash64); \
\
- uint64 oddRandom = 481046412LL << 32 | 1025306954LL; \
- uint32 shiftRandom = 10121U << 16; \
+ uint64 odd_random = 481046412LL << 32 | 1025306954LL; \
+ uint32 shift_random = 10121U << 16; \
\
- hash64 = hash64 * oddRandom + shiftRandom; \
- std::size_t highBits = static_cast<std::size_t>( \
+ hash64 = hash64 * odd_random + shift_random; \
+ std::size_t high_bits = static_cast<std::size_t>( \
hash64 >> (sizeof(uint64) - sizeof(std::size_t))); \
- return highBits; \
+ return high_bits; \
} \
DEFINE_PAIR_HASH_FUNCTION_END();
@@ -88,10 +88,10 @@ DEFINE_32BIT_PAIR_HASH(unsigned, unsigned);
#define DEFINE_64BIT_PAIR_HASH(type1, type2) \
DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) { \
- uint32 shortRandom1 = 842304669U; \
- uint32 shortRandom2 = 619063811U; \
- uint32 shortRandom3 = 937041849U; \
- uint32 shortRandom4 = 3309708029U; \
+ uint32 short_random1 = 842304669U; \
+ uint32 short_random2 = 619063811U; \
+ uint32 short_random3 = 937041849U; \
+ uint32 short_random4 = 3309708029U; \
\
uint64 value1 = value.first; \
uint64 value2 = value.second; \
@@ -100,23 +100,23 @@ DEFINE_32BIT_PAIR_HASH(unsigned, unsigned);
uint32 value2a = static_cast<uint32>(value2 & 0xffffffff); \
uint32 value2b = static_cast<uint32>((value2 >> 32) & 0xffffffff); \
\
- uint64 product1 = static_cast<uint64>(value1a) * shortRandom1; \
- uint64 product2 = static_cast<uint64>(value1b) * shortRandom2; \
- uint64 product3 = static_cast<uint64>(value2a) * shortRandom3; \
- uint64 product4 = static_cast<uint64>(value2b) * shortRandom4; \
+ uint64 product1 = static_cast<uint64>(value1a) * short_random1; \
+ uint64 product2 = static_cast<uint64>(value1b) * short_random2; \
+ uint64 product3 = static_cast<uint64>(value2a) * short_random3; \
+ uint64 product4 = static_cast<uint64>(value2b) * short_random4; \
\
uint64 hash64 = product1 + product2 + product3 + product4; \
\
if (sizeof(std::size_t) >= sizeof(uint64)) \
return static_cast<std::size_t>(hash64); \
\
- uint64 oddRandom = 1578233944LL << 32 | 194370989LL; \
- uint32 shiftRandom = 20591U << 16; \
+ uint64 odd_random = 1578233944LL << 32 | 194370989LL; \
+ uint32 shift_random = 20591U << 16; \
\
- hash64 = hash64 * oddRandom + shiftRandom; \
- std::size_t highBits = static_cast<std::size_t>( \
+ hash64 = hash64 * odd_random + shift_random; \
+ std::size_t high_bits = static_cast<std::size_t>( \
hash64 >> (sizeof(uint64) - sizeof(std::size_t))); \
- return highBits; \
+ return high_bits; \
} \
DEFINE_PAIR_HASH_FUNCTION_END();
diff --git a/cc/base/math_util.h b/cc/base/math_util.h
index dea3b08..dc9110f 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -80,7 +80,7 @@ class CC_EXPORT MathUtil {
}
// Background: Existing transform code does not do the right thing in
- // mapRect / mapQuad / projectQuad when there is a perspective projection that
+ // MapRect / MapQuad / ProjectQuad when there is a perspective projection that
// causes one of the transformed vertices to go to w < 0. In those cases, it
// is necessary to perform clipping in homogeneous coordinates, after applying
// the transform, before dividing-by-w to convert to cartesian coordinates.
@@ -95,14 +95,14 @@ class CC_EXPORT MathUtil {
const gfx::RectF& rect);
// Returns an array of vertices that represent the clipped polygon. After
- // returning, indexes from 0 to numVerticesInClippedQuad are valid in the
- // clippedQuad array. Note that numVerticesInClippedQuad may be zero, which
- // means the entire quad was clipped, and none of the vertices in the array
- // are valid.
+ // returning, indexes from 0 to num_vertices_in_clipped_quad are valid in the
+ // clipped_quad array. Note that num_vertices_in_clipped_quad may be zero,
+ // which means the entire quad was clipped, and none of the vertices in the
+ // array are valid.
static void MapClippedQuad(const gfx::Transform& transform,
const gfx::QuadF& src_quad,
- gfx::PointF clippedQuad[8],
- int& numVerticesInClippedQuad);
+ gfx::PointF clipped_quad[8],
+ int& num_vertices_in_clipped_quad);
static gfx::RectF ComputeEnclosingRectOfVertices(gfx::PointF vertices[],
int num_vertices);
diff --git a/cc/base/region_unittest.cc b/cc/base/region_unittest.cc
index eaf8d74..737ae27 100644
--- a/cc/base/region_unittest.cc
+++ b/cc/base/region_unittest.cc
@@ -238,25 +238,25 @@ TEST(RegionTest, ContainsRegion) {
TEST_NO_CONTAINS(gfx::Rect(10, 10, 1, 1), gfx::Rect(10, 10, 2, 2));
TEST_NO_CONTAINS(gfx::Rect(10, 10, 1, 1), gfx::Rect(9, 9, 3, 3));
- Region hLines;
+ Region h_lines;
for (int i = 10; i < 20; i += 2)
- hLines.Union(gfx::Rect(i, 10, 1, 10));
+ h_lines.Union(gfx::Rect(i, 10, 1, 10));
- TEST_CONTAINS(gfx::Rect(10, 10, 9, 10), hLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 10, 9, 9), hLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 11, 9, 9), hLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 10, 8, 10), hLines);
- TEST_NO_CONTAINS(gfx::Rect(11, 10, 8, 10), hLines);
+ TEST_CONTAINS(gfx::Rect(10, 10, 9, 10), h_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 10, 9, 9), h_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 11, 9, 9), h_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 10, 8, 10), h_lines);
+ TEST_NO_CONTAINS(gfx::Rect(11, 10, 8, 10), h_lines);
- Region vLines;
+ Region v_lines;
for (int i = 10; i < 20; i += 2)
- vLines.Union(gfx::Rect(10, i, 10, 1));
+ v_lines.Union(gfx::Rect(10, i, 10, 1));
- TEST_CONTAINS(gfx::Rect(10, 10, 10, 9), vLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 10, 9, 9), vLines);
- TEST_NO_CONTAINS(gfx::Rect(11, 10, 9, 9), vLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 10, 10, 8), vLines);
- TEST_NO_CONTAINS(gfx::Rect(10, 11, 10, 8), vLines);
+ TEST_CONTAINS(gfx::Rect(10, 10, 10, 9), v_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 10, 9, 9), v_lines);
+ TEST_NO_CONTAINS(gfx::Rect(11, 10, 9, 9), v_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 10, 10, 8), v_lines);
+ TEST_NO_CONTAINS(gfx::Rect(10, 11, 10, 8), v_lines);
Region grid;
for (int i = 10; i < 20; i += 2)
@@ -269,21 +269,21 @@ TEST(RegionTest, ContainsRegion) {
TEST_NO_CONTAINS(gfx::Rect(10, 10, 8, 9), grid);
TEST_NO_CONTAINS(gfx::Rect(11, 10, 8, 9), grid);
- TEST_CONTAINS(hLines, hLines);
- TEST_CONTAINS(vLines, vLines);
- TEST_NO_CONTAINS(vLines, hLines);
- TEST_NO_CONTAINS(hLines, vLines);
+ TEST_CONTAINS(h_lines, h_lines);
+ TEST_CONTAINS(v_lines, v_lines);
+ TEST_NO_CONTAINS(v_lines, h_lines);
+ TEST_NO_CONTAINS(h_lines, v_lines);
TEST_CONTAINS(grid, grid);
- TEST_CONTAINS(hLines, grid);
- TEST_CONTAINS(vLines, grid);
- TEST_NO_CONTAINS(grid, hLines);
- TEST_NO_CONTAINS(grid, vLines);
+ TEST_CONTAINS(h_lines, grid);
+ TEST_CONTAINS(v_lines, grid);
+ TEST_NO_CONTAINS(grid, h_lines);
+ TEST_NO_CONTAINS(grid, v_lines);
for (int i = 10; i < 20; i += 2)
- TEST_CONTAINS(hLines, gfx::Rect(i, 10, 1, 10));
+ TEST_CONTAINS(h_lines, gfx::Rect(i, 10, 1, 10));
for (int i = 10; i < 20; i += 2)
- TEST_CONTAINS(vLines, gfx::Rect(10, i, 10, 1));
+ TEST_CONTAINS(v_lines, gfx::Rect(10, i, 10, 1));
for (int i = 10; i < 20; i += 2)
for (int j = 10; j < 20; j += 2)
diff --git a/cc/base/scoped_ptr_hash_map.h b/cc/base/scoped_ptr_hash_map.h
index a2a8be7..734fb8a 100644
--- a/cc/base/scoped_ptr_hash_map.h
+++ b/cc/base/scoped_ptr_hash_map.h
@@ -42,14 +42,14 @@ class ScopedPtrHashMap {
iterator it = find(key);
if (it != end())
erase(it);
- Value* rawPtr = data.release();
- return data_.insert(std::pair<Key, Value*>(key, rawPtr));
+ Value* raw_ptr = data.release();
+ return data_.insert(std::pair<Key, Value*>(key, raw_ptr));
}
// Does nothing if key is already present
std::pair<iterator, bool> add(Key key, scoped_ptr<Value> data) {
- Value* rawPtr = data.release();
- return data_.insert(std::pair<Key, Value*>(key, rawPtr));
+ Value* raw_ptr = data.release();
+ return data_.insert(std::pair<Key, Value*>(key, raw_ptr));
}
void erase(iterator it) {
diff --git a/cc/base/tiling_data.cc b/cc/base/tiling_data.cc
index 57985c1..f734b35 100644
--- a/cc/base/tiling_data.cc
+++ b/cc/base/tiling_data.cc
@@ -11,11 +11,15 @@
namespace cc {
-static int ComputeNumTiles(int max_texture_size, int total_size, int border_texels) {
+static int ComputeNumTiles(int max_texture_size,
+ int total_size,
+ int border_texels) {
if (max_texture_size - 2 * border_texels <= 0)
return total_size > 0 && max_texture_size >= total_size ? 1 : 0;
- int num_tiles = std::max(1, 1 + (total_size - 1 - 2 * border_texels) / (max_texture_size - 2 * border_texels));
+ int num_tiles = std::max(1,
+ 1 + (total_size - 1 - 2 * border_texels) /
+ (max_texture_size - 2 * border_texels));
return total_size > 0 ? num_tiles : 0;
}
@@ -27,10 +31,10 @@ TilingData::TilingData()
TilingData::TilingData(
gfx::Size max_texture_size,
gfx::Size total_size,
- bool hasBorderTexels)
+ bool has_border_texels)
: max_texture_size_(max_texture_size),
total_size_(total_size),
- border_texels_(hasBorderTexels ? 1 : 0) {
+ border_texels_(has_border_texels ? 1 : 0) {
RecomputeNumTiles();
}
diff --git a/cc/debug/fake_web_graphics_context_3d.cc b/cc/debug/fake_web_graphics_context_3d.cc
index 0f53255..c626eb1 100644
--- a/cc/debug/fake_web_graphics_context_3d.cc
+++ b/cc/debug/fake_web_graphics_context_3d.cc
@@ -41,7 +41,7 @@ bool FakeWebGraphicsContext3D::isGLES2Compliant() {
bool FakeWebGraphicsContext3D::readBackFramebuffer(
unsigned char* pixels,
- size_t bufferSize,
+ size_t buffer_size,
WebGLId framebuffer,
int width,
int height) {
diff --git a/cc/debug/fake_web_graphics_context_3d.h b/cc/debug/fake_web_graphics_context_3d.h
index 19ed9a7..dc0ea99 100644
--- a/cc/debug/fake_web_graphics_context_3d.h
+++ b/cc/debug/fake_web_graphics_context_3d.h
@@ -80,10 +80,14 @@ class CC_EXPORT FakeWebGraphicsContext3D :
virtual void requestExtensionCHROMIUM(const char*) {}
virtual void blitFramebufferCHROMIUM(
- WebKit::WGC3Dint srcX0, WebKit::WGC3Dint srcY0,
- WebKit::WGC3Dint srcX1, WebKit::WGC3Dint srcY1,
- WebKit::WGC3Dint dstX0, WebKit::WGC3Dint dstY0,
- WebKit::WGC3Dint dstX1, WebKit::WGC3Dint dstY1,
+ WebKit::WGC3Dint src_x0,
+ WebKit::WGC3Dint src_y0,
+ WebKit::WGC3Dint src_x1,
+ WebKit::WGC3Dint src_y1,
+ WebKit::WGC3Dint dst_x0,
+ WebKit::WGC3Dint dst_y0,
+ WebKit::WGC3Dint dst_x1,
+ WebKit::WGC3Dint dst_y1,
WebKit::WGC3Dbitfield mask,
WebKit::WGC3Denum filter) {}
virtual void renderbufferStorageMultisampleCHROMIUM(
@@ -160,7 +164,7 @@ class CC_EXPORT FakeWebGraphicsContext3D :
WebKit::WGC3Dsizei width,
WebKit::WGC3Dsizei height,
WebKit::WGC3Dint border,
- WebKit::WGC3Dsizei imageSize,
+ WebKit::WGC3Dsizei image_size,
const void* data) {}
virtual void compressedTexSubImage2D(
WebKit::WGC3Denum target,
@@ -170,7 +174,7 @@ class CC_EXPORT FakeWebGraphicsContext3D :
WebKit::WGC3Dsizei width,
WebKit::WGC3Dsizei height,
WebKit::WGC3Denum format,
- WebKit::WGC3Dsizei imageSize,
+ WebKit::WGC3Dsizei image_size,
const void* data) {}
virtual void copyTexImage2D(
WebKit::WGC3Denum target,
@@ -194,8 +198,8 @@ class CC_EXPORT FakeWebGraphicsContext3D :
virtual void depthFunc(WebKit::WGC3Denum func) {}
virtual void depthMask(WebKit::WGC3Dboolean flag) {}
virtual void depthRange(
- WebKit::WGC3Dclampf zNear,
- WebKit::WGC3Dclampf zFar) {}
+ WebKit::WGC3Dclampf z_near,
+ WebKit::WGC3Dclampf z_far) {}
virtual void detachShader(WebKit::WebGLId program, WebKit::WebGLId shader) {}
virtual void disable(WebKit::WGC3Denum cap) {}
virtual void disableVertexAttribArray(WebKit::WGC3Duint index) {}
@@ -236,7 +240,7 @@ class CC_EXPORT FakeWebGraphicsContext3D :
ActiveInfo&);
virtual void getAttachedShaders(
WebKit::WebGLId program,
- WebKit::WGC3Dsizei maxCount,
+ WebKit::WGC3Dsizei max_count,
WebKit::WGC3Dsizei* count,
WebKit::WebGLId* shaders) {}
virtual WebKit::WGC3Dint getAttribLocation(
diff --git a/cc/debug/frame_rate_counter.cc b/cc/debug/frame_rate_counter.cc
index d546b10..bcd31b0 100644
--- a/cc/debug/frame_rate_counter.cc
+++ b/cc/debug/frame_rate_counter.cc
@@ -111,7 +111,7 @@ double FrameRateCounter::GetAverageFPS() const {
// the first few swapbuffers happen instantly which skews the statistics
// too much for short lived animations.
//
- // isBadFrameInterval encapsulates the frame too slow/frame too fast logic.
+ // IsBadFrameInterval encapsulates the frame too slow/frame too fast logic.
for (RingBufferType::Iterator it = --ring_buffer_.End();
it && frame_times_total < 1.0;
diff --git a/cc/debug/overdraw_metrics.cc b/cc/debug/overdraw_metrics.cc
index 0afaa44..b8a382c 100644
--- a/cc/debug/overdraw_metrics.cc
+++ b/cc/debug/overdraw_metrics.cc
@@ -46,13 +46,13 @@ static inline float PolygonArea(gfx::PointF points[8], int num_points) {
// of the resulting polygon.
static inline float AreaOfMappedQuad(const gfx::Transform& transform,
const gfx::QuadF& quad) {
- gfx::PointF clippedQuad[8];
+ gfx::PointF clipped_quad[8];
int num_vertices_in_clipped_quad = 0;
MathUtil::MapClippedQuad(transform,
quad,
- clippedQuad,
+ clipped_quad,
num_vertices_in_clipped_quad);
- return PolygonArea(clippedQuad, num_vertices_in_clipped_quad);
+ return PolygonArea(clipped_quad, num_vertices_in_clipped_quad);
}
void OverdrawMetrics::DidPaint(gfx::Rect painted_rect) {
diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h
index 33ea2c6..675af68 100644
--- a/cc/debug/rendering_stats.h
+++ b/cc/debug/rendering_stats.h
@@ -36,7 +36,7 @@ struct CC_EXPORT RenderingStats {
RenderingStats();
- // In conjunction with enumerateFields, this allows the embedder to
+ // In conjunction with EnumerateFields, this allows the embedder to
// enumerate the values in this structure without
// having to embed references to its specific member variables. This
// simplifies the addition of new fields to this type.
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index 7be60a1..cf18a66 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -41,7 +41,7 @@ class CC_EXPORT InputHandlerClient {
ScrollInputType type) = 0;
// Scroll the selected layer starting at the given position. If the scroll
- // type given to scrollBegin was a gesture, then the scroll point and delta
+ // type given to ScrollBegin was a gesture, then the scroll point and delta
// should be in viewport (logical pixel) coordinates. Otherwise they are in
// scrolling layer's (logical pixel) space. If there is no room to move the
// layer in the requested direction, its first ancestor layer that can be
diff --git a/cc/input/top_controls_manager_unittest.cc b/cc/input/top_controls_manager_unittest.cc
index dbe174f..6ff002b 100644
--- a/cc/input/top_controls_manager_unittest.cc
+++ b/cc/input/top_controls_manager_unittest.cc
@@ -73,7 +73,7 @@ class MockTopControlsManagerClient : public TopControlsManagerClient {
float top_controls_hide_threshold_;
};
-TEST(TopControlsManagerTest, ensureScrollThresholdApplied) {
+TEST(TopControlsManagerTest, EnsureScrollThresholdApplied) {
MockTopControlsManagerClient client(0.5f, 0.5f);
TopControlsManager* manager = client.manager();
@@ -117,7 +117,7 @@ TEST(TopControlsManagerTest, ensureScrollThresholdApplied) {
manager->ScrollEnd();
}
-TEST(TopControlsManagerTest, partialShownHideAnimation) {
+TEST(TopControlsManagerTest, PartialShownHideAnimation) {
MockTopControlsManagerClient client(0.5f, 0.5f);
TopControlsManager* manager = client.manager();
manager->ScrollBegin();
@@ -147,7 +147,7 @@ TEST(TopControlsManagerTest, partialShownHideAnimation) {
EXPECT_EQ(0.f, manager->content_top_offset());
}
-TEST(TopControlsManagerTest, partialShownShowAnimation) {
+TEST(TopControlsManagerTest, PartialShownShowAnimation) {
MockTopControlsManagerClient client(0.5f, 0.5f);
TopControlsManager* manager = client.manager();
manager->ScrollBegin();
@@ -177,7 +177,7 @@ TEST(TopControlsManagerTest, partialShownShowAnimation) {
EXPECT_EQ(100.f, manager->content_top_offset());
}
-TEST(TopControlsManagerTest, partialHiddenWithAmbiguousThresholdShows) {
+TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdShows) {
MockTopControlsManagerClient client(0.25f, 0.25f);
TopControlsManager* manager = client.manager();
@@ -203,7 +203,7 @@ TEST(TopControlsManagerTest, partialHiddenWithAmbiguousThresholdShows) {
EXPECT_EQ(100.f, manager->content_top_offset());
}
-TEST(TopControlsManagerTest, partialHiddenWithAmbiguousThresholdHides) {
+TEST(TopControlsManagerTest, PartialHiddenWithAmbiguousThresholdHides) {
MockTopControlsManagerClient client(0.25f, 0.25f);
TopControlsManager* manager = client.manager();
@@ -229,7 +229,7 @@ TEST(TopControlsManagerTest, partialHiddenWithAmbiguousThresholdHides) {
EXPECT_EQ(0.f, manager->content_top_offset());
}
-TEST(TopControlsManagerTest, partialShownWithAmbiguousThresholdHides) {
+TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdHides) {
MockTopControlsManagerClient client(0.25f, 0.25f);
TopControlsManager* manager = client.manager();
@@ -259,7 +259,7 @@ TEST(TopControlsManagerTest, partialShownWithAmbiguousThresholdHides) {
EXPECT_EQ(0.f, manager->content_top_offset());
}
-TEST(TopControlsManagerTest, partialShownWithAmbiguousThresholdShows) {
+TEST(TopControlsManagerTest, PartialShownWithAmbiguousThresholdShows) {
MockTopControlsManagerClient client(0.25f, 0.25f);
TopControlsManager* manager = client.manager();
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();
diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc
index 313093a..d6d24c2 100644
--- a/cc/output/delegating_renderer.cc
+++ b/cc/output/delegating_renderer.cc
@@ -73,50 +73,50 @@ bool DelegatingRenderer::Initialize() {
context3d->setContextLostCallback(this);
context3d->pushGroupMarkerEXT("CompositorContext");
- std::string extensionsString =
+ std::string extensions_string =
UTF16ToASCII(context3d->getString(GL_EXTENSIONS));
std::vector<std::string> extensions;
- base::SplitString(extensionsString, ' ', &extensions);
+ base::SplitString(extensions_string, ' ', &extensions);
// TODO(danakj): We need non-GPU-specific paths for these things. This
// renderer shouldn't need to use context3d extensions directly.
- bool hasReadBGRA = true;
- bool hasSetVisibility = true;
- bool hasIOSurface = true;
- bool hasARBTextureRect = true;
- bool hasGpuMemoryManager = true;
- bool hasEGLImage = true;
+ bool has_read_bgra = true;
+ bool has_set_visibility = true;
+ bool has_io_surface = true;
+ bool has_arb_texture_rect = true;
+ bool has_gpu_memory_manager = true;
+ bool has_egl_image = true;
for (size_t i = 0; i < extensions.size(); ++i) {
if (extensions[i] == "GL_EXT_read_format_bgra")
- hasReadBGRA = true;
+ has_read_bgra = true;
else if (extensions[i] == "GL_CHROMIUM_set_visibility")
- hasSetVisibility = true;
+ has_set_visibility = true;
else if (extensions[i] == "GL_CHROMIUM_iosurface")
- hasIOSurface = true;
+ has_io_surface = true;
else if (extensions[i] == "GL_ARB_texture_rectangle")
- hasARBTextureRect = true;
+ has_arb_texture_rect = true;
else if (extensions[i] == "GL_CHROMIUM_gpu_memory_manager")
- hasGpuMemoryManager = true;
+ has_gpu_memory_manager = true;
else if (extensions[i] == "GL_OES_EGL_image_external")
- hasEGLImage = true;
+ has_egl_image = true;
}
- if (hasIOSurface)
- DCHECK(hasARBTextureRect);
+ if (has_io_surface)
+ DCHECK(has_arb_texture_rect);
capabilities_.using_accelerated_painting =
Settings().accelerate_painting &&
capabilities_.best_texture_format == GL_BGRA_EXT &&
- hasReadBGRA;
+ has_read_bgra;
// TODO(piman): loop visibility to GPU process?
- capabilities_.using_set_visibility = hasSetVisibility;
+ capabilities_.using_set_visibility = has_set_visibility;
// TODO(danakj): Support GpuMemoryManager.
capabilities_.using_gpu_memory_manager = false;
- capabilities_.using_egl_image = hasEGLImage;
+ capabilities_.using_egl_image = has_egl_image;
return true;
}
@@ -140,7 +140,7 @@ static ResourceProvider::ResourceId AppendToArray(
void DelegatingRenderer::DrawFrame(
RenderPassList& render_passes_in_draw_order) {
- TRACE_EVENT0("cc", "DelegatingRenderer::drawFrame");
+ TRACE_EVENT0("cc", "DelegatingRenderer::DrawFrame");
CompositorFrame out_frame;
out_frame.metadata = client_->MakeCompositorFrameMetadata();
diff --git a/cc/output/delegating_renderer_unittest.cc b/cc/output/delegating_renderer_unittest.cc
index bd53886..c0b8dff 100644
--- a/cc/output/delegating_renderer_unittest.cc
+++ b/cc/output/delegating_renderer_unittest.cc
@@ -95,7 +95,7 @@ class DelegatingRendererTestResources : public DelegatingRendererTest {
frame->render_passes.clear();
frame->render_passes_by_id.clear();
- TestRenderPass* child_pass = addRenderPass(
+ TestRenderPass* child_pass = AddRenderPass(
frame->render_passes,
RenderPass::Id(2, 1),
gfx::Rect(3, 3, 10, 10),
@@ -103,7 +103,7 @@ class DelegatingRendererTestResources : public DelegatingRendererTest {
child_pass->AppendOneOfEveryQuadType(
host_impl->resource_provider(), RenderPass::Id(0, 0));
- TestRenderPass* pass = addRenderPass(
+ TestRenderPass* pass = AddRenderPass(
frame->render_passes,
RenderPass::Id(1, 1),
gfx::Rect(3, 3, 10, 10),
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 2f7905c..d398f16 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -68,12 +68,12 @@ gfx::RectF DirectRenderer::QuadVertexRect() {
// static
void DirectRenderer::QuadRectTransform(gfx::Transform* quad_rect_transform,
- const gfx::Transform& quadTransform,
- const gfx::RectF& quadRect) {
- *quad_rect_transform = quadTransform;
- quad_rect_transform->Translate(0.5 * quadRect.width() + quadRect.x(),
- 0.5 * quadRect.height() + quadRect.y());
- quad_rect_transform->Scale(quadRect.width(), quadRect.height());
+ const gfx::Transform& quad_transform,
+ const gfx::RectF& quad_rect) {
+ *quad_rect_transform = quad_transform;
+ quad_rect_transform->Translate(0.5 * quad_rect.width() + quad_rect.x(),
+ 0.5 * quad_rect.height() + quad_rect.y());
+ quad_rect_transform->Scale(quad_rect.width(), quad_rect.height());
}
// static
@@ -131,27 +131,27 @@ void DirectRenderer::SetEnlargePassTextureAmountForTesting(
void DirectRenderer::DecideRenderPassAllocationsForFrame(
const RenderPassList& render_passes_in_draw_order) {
- base::hash_map<RenderPass::Id, const RenderPass*> renderPassesInFrame;
+ base::hash_map<RenderPass::Id, const RenderPass*> render_passes_in_frame;
for (size_t i = 0; i < render_passes_in_draw_order.size(); ++i)
- renderPassesInFrame.insert(std::pair<RenderPass::Id, const RenderPass*>(
+ render_passes_in_frame.insert(std::pair<RenderPass::Id, const RenderPass*>(
render_passes_in_draw_order[i]->id, render_passes_in_draw_order[i]));
std::vector<RenderPass::Id> passes_to_delete;
- ScopedPtrHashMap<RenderPass::Id, CachedResource>::const_iterator passIterator;
- for (passIterator = render_pass_textures_.begin();
- passIterator != render_pass_textures_.end();
- ++passIterator) {
+ ScopedPtrHashMap<RenderPass::Id, CachedResource>::const_iterator pass_iter;
+ for (pass_iter = render_pass_textures_.begin();
+ pass_iter != render_pass_textures_.end();
+ ++pass_iter) {
base::hash_map<RenderPass::Id, const RenderPass*>::const_iterator it =
- renderPassesInFrame.find(passIterator->first);
- if (it == renderPassesInFrame.end()) {
- passes_to_delete.push_back(passIterator->first);
+ render_passes_in_frame.find(pass_iter->first);
+ if (it == render_passes_in_frame.end()) {
+ passes_to_delete.push_back(pass_iter->first);
continue;
}
const RenderPass* render_pass_in_frame = it->second;
gfx::Size required_size = RenderPassTextureSize(render_pass_in_frame);
GLenum required_format = RenderPassTextureFormat(render_pass_in_frame);
- CachedResource* texture = passIterator->second;
+ CachedResource* texture = pass_iter->second;
DCHECK(texture);
bool size_appropriate = texture->size().width() >= required_size.width() &&
@@ -177,7 +177,7 @@ void DirectRenderer::DecideRenderPassAllocationsForFrame(
}
void DirectRenderer::DrawFrame(RenderPassList& render_passes_in_draw_order) {
- TRACE_EVENT0("cc", "DirectRenderer::drawFrame");
+ TRACE_EVENT0("cc", "DirectRenderer::DrawFrame");
UMA_HISTOGRAM_COUNTS("Renderer4.renderPassCount",
render_passes_in_draw_order.size());
@@ -206,12 +206,12 @@ gfx::RectF DirectRenderer::ComputeScissorRectForRenderPass(
if (frame.root_damage_rect == frame.root_render_pass->output_rect)
return render_pass_scissor;
- gfx::Transform inverseTransform(gfx::Transform::kSkipInitialization);
+ gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization);
if (frame.current_render_pass->transform_to_root_target.GetInverse(
- &inverseTransform)) {
+ &inverse_transform)) {
// Only intersect inverse-projected damage if the transform is invertible.
gfx::RectF damage_rect_in_render_pass_space =
- MathUtil::ProjectClippedRect(inverseTransform, frame.root_damage_rect);
+ MathUtil::ProjectClippedRect(inverse_transform, frame.root_damage_rect);
render_pass_scissor.Intersect(damage_rect_in_render_pass_space);
}
@@ -251,7 +251,7 @@ void DirectRenderer::FinishDrawingQuadList() {}
void DirectRenderer::DrawRenderPass(DrawingFrame& frame,
const RenderPass* render_pass) {
- TRACE_EVENT0("cc", "DirectRenderer::drawRenderPass");
+ TRACE_EVENT0("cc", "DirectRenderer::DrawRenderPass");
if (!UseRenderPass(frame, render_pass))
return;
@@ -271,8 +271,8 @@ void DirectRenderer::DrawRenderPass(DrawingFrame& frame,
}
const QuadList& quad_list = render_pass->quad_list;
- for (QuadList::constBackToFrontIterator it = quad_list.backToFrontBegin();
- it != quad_list.backToFrontEnd();
+ for (QuadList::ConstBackToFrontIterator it = quad_list.BackToFrontBegin();
+ it != quad_list.BackToFrontEnd();
++it) {
const DrawQuad& quad = *(*it);
bool should_skip_quad = false;
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index b88e1b1..dc1d1c8 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -213,8 +213,8 @@ void GLRenderer::SetVisible(bool visible) {
EnforceMemoryPolicy();
- // TODO: Replace setVisibilityCHROMIUM with an extension to explicitly manage
- // front/backbuffers
+ // TODO: Replace setVisibilityCHROMIUM() with an extension to explicitly
+ // manage front/backbuffers
// crbug.com/116049
if (capabilities_.using_set_visibility)
context_->setVisibilityCHROMIUM(visible);
@@ -256,7 +256,7 @@ void GLRenderer::BeginDrawingFrame(DrawingFrame& frame) {
if (ViewportSize().IsEmpty())
return;
- TRACE_EVENT0("cc", "GLRenderer::drawLayers");
+ TRACE_EVENT0("cc", "GLRenderer::DrawLayers");
if (is_viewport_changed_) {
// Only reshape when we know we are going to draw. Otherwise, the reshape
// can leave the window at the wrong size if we never draw and the proper
@@ -1339,7 +1339,7 @@ void GLRenderer::FlushTextureQuadCache() {
// causing platform differences in some layout tests (see
// https://bugs.webkit.org/show_bug.cgi?id=82412), so in this situation, use
// a separate blend function for the alpha channel to avoid modifying it.
- // Don't use colorMask for this as it has performance implications on some
+ // Don't use colorMask() for this as it has performance implications on some
// platforms.
GLC(Context(),
Context()->blendFuncSeparate(
@@ -1471,7 +1471,7 @@ void GLRenderer::DrawTextureQuad(const DrawingFrame& frame,
// causing platform differences in some layout tests (see
// https://bugs.webkit.org/show_bug.cgi?id=82412), so in this situation, use
// a separate blend function for the alpha channel to avoid modifying it.
- // Don't use colorMask for this as it has performance implications on some
+ // Don't use colorMask() for this as it has performance implications on some
// platforms.
GLC(Context(),
Context()->blendFuncSeparate(
@@ -1650,7 +1650,7 @@ bool GLRenderer::SwapBuffers() {
DCHECK(visible_);
DCHECK(!is_backbuffer_discarded_);
- TRACE_EVENT0("cc", "GLRenderer::swapBuffers");
+ TRACE_EVENT0("cc", "GLRenderer::SwapBuffers");
// We're done! Time to swapbuffers!
if (capabilities_.using_partial_swap) {
@@ -1734,7 +1734,7 @@ ManagedMemoryPolicy::PriorityCutoff GLRenderer::PriorityCutoff(
void GLRenderer::EnforceMemoryPolicy() {
if (!visible_) {
- TRACE_EVENT0("cc", "GLRenderer::enforceMemoryPolicy dropping resources");
+ TRACE_EVENT0("cc", "GLRenderer::EnforceMemoryPolicy dropping resources");
ReleaseRenderPassTextures();
if (discard_backbuffer_when_not_visible_)
DiscardBackbuffer();
@@ -1780,8 +1780,8 @@ void GLRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) {
GLuint temporary_fbo = 0;
if (do_workaround) {
- // On Mac OS X, calling glReadPixels against an FBO whose color attachment
- // is an IOSurface-backed texture causes corruption of future glReadPixels
+ // On Mac OS X, calling glReadPixels() against an FBO whose color attachment
+ // is an IOSurface-backed texture causes corruption of future glReadPixels()
// calls, even those on different OpenGL contexts. It is believed that this
// is the root cause of top crasher
// http://crbug.com/99393. <rdar://problem/10949687>
@@ -1951,7 +1951,7 @@ void GLRenderer::SetDrawViewportSize(gfx::Size viewport_size) {
bool GLRenderer::MakeContextCurrent() { return context_->makeContextCurrent(); }
bool GLRenderer::InitializeSharedObjects() {
- TRACE_EVENT0("cc", "GLRenderer::initializeSharedObjects");
+ TRACE_EVENT0("cc", "GLRenderer::InitializeSharedObjects");
MakeContextCurrent();
// Create an FBO for doing offscreen rendering.
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index e6a668d..8dd2c64 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -156,7 +156,7 @@ class CC_EXPORT GLRenderer :
const gfx::Transform& draw_matrix);
// Check if quad needs antialiasing and if so, inflate the quad and
- // fill edge array for fragment shader. localQuad is set to
+ // fill edge array for fragment shader. local_quad is set to
// inflated quad if antialiasing is required, otherwise it is left
// unchanged. edge array is filled with inflated quad's edge data
// if antialiasing is required, otherwise it is left unchanged.
diff --git a/cc/output/gl_renderer_pixeltest.cc b/cc/output/gl_renderer_pixeltest.cc
index bd00069..fbccce1 100644
--- a/cc/output/gl_renderer_pixeltest.cc
+++ b/cc/output/gl_renderer_pixeltest.cc
@@ -69,7 +69,7 @@ scoped_ptr<DrawQuad> CreateTestRenderPassDrawQuad(
#if !defined(OS_ANDROID)
-TEST_F(GLRendererPixelTest, simpleGreenRect) {
+TEST_F(GLRendererPixelTest, SimpleGreenRect) {
gfx::Rect rect(device_viewport_size_);
RenderPass::Id id(1, 1);
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 537da0e..8ebcd4d 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -232,7 +232,7 @@ class GLRendererTest : public testing::Test {
FakeRendererGL renderer_;
};
-// Test GLRenderer discardBackbuffer functionality:
+// Test GLRenderer DiscardBackbuffer functionality:
// Suggest recreating framebuffer when one already exists.
// Expected: it does nothing.
TEST_F(GLRendererTest, SuggestBackbufferYesWhenItAlreadyExistsShouldDoNothing) {
@@ -244,7 +244,7 @@ TEST_F(GLRendererTest, SuggestBackbufferYesWhenItAlreadyExistsShouldDoNothing) {
EXPECT_EQ(1, context()->frame_count());
}
-// Test GLRenderer discardBackbuffer functionality:
+// Test GLRenderer DiscardBackbuffer functionality:
// Suggest discarding framebuffer when one exists and the renderer is not
// visible.
// Expected: it is discarded and damage tracker is reset.
@@ -256,7 +256,7 @@ TEST_F(GLRendererTest,
EXPECT_TRUE(renderer_.IsBackbufferDiscarded());
}
-// Test GLRenderer discardBackbuffer functionality:
+// Test GLRenderer DiscardBackbuffer functionality:
// Suggest discarding framebuffer when one exists and the renderer is visible.
// Expected: the allocation is ignored.
TEST_F(GLRendererTest, SuggestBackbufferNoDoNothingWhenVisible) {
@@ -266,7 +266,7 @@ TEST_F(GLRendererTest, SuggestBackbufferNoDoNothingWhenVisible) {
EXPECT_FALSE(renderer_.IsBackbufferDiscarded());
}
-// Test GLRenderer discardBackbuffer functionality:
+// Test GLRenderer DiscardBackbuffer functionality:
// Suggest discarding framebuffer when one does not exist.
// Expected: it does nothing.
TEST_F(GLRendererTest, SuggestBackbufferNoWhenItDoesntExistShouldDoNothing) {
@@ -280,7 +280,7 @@ TEST_F(GLRendererTest, SuggestBackbufferNoWhenItDoesntExistShouldDoNothing) {
EXPECT_TRUE(renderer_.IsBackbufferDiscarded());
}
-// Test GLRenderer discardBackbuffer functionality:
+// Test GLRenderer DiscardBackbuffer functionality:
// Begin drawing a frame while a framebuffer is discarded.
// Expected: will recreate framebuffer.
TEST_F(GLRendererTest, DiscardedBackbufferIsRecreatedForScopeDuration) {
@@ -668,7 +668,7 @@ TEST(GLRendererTest2, VisibilityChangeIsLastCall) {
bool last_call_was_set_visiblity = false;
// Ensure that the call to setVisibilityCHROMIUM is the last call issue to the
// GPU process, after glFlush is called, and after the RendererClient's
- // enforceManagedMemoryPolicy is called. Plumb this tracking between both the
+ // EnforceManagedMemoryPolicy is called. Plumb this tracking between both the
// RenderClient and the Context by giving them both a pointer to a variable on
// the stack.
context->set_last_call_was_set_visibility_pointer(&last_call_was_set_visiblity);
@@ -766,9 +766,9 @@ TEST(GLRendererTest2, ActiveTextureState) {
renderer.BeginDrawingFrame(drawing_frame);
EXPECT_EQ(context->active_texture(), GL_TEXTURE0);
- for (cc::QuadList::backToFrontIterator
- it = pass->quad_list.backToFrontBegin();
- it != pass->quad_list.backToFrontEnd();
+ for (cc::QuadList::BackToFrontIterator
+ it = pass->quad_list.BackToFrontBegin();
+ it != pass->quad_list.BackToFrontEnd();
++it) {
renderer.DoDrawQuad(drawing_frame, *it);
}
@@ -812,16 +812,16 @@ TEST(GLRendererTest2, ShouldClearRootRenderPass) {
render_passes.clear();
RenderPass::Id root_pass_id(1, 0);
- TestRenderPass* root_pass = addRenderPass(
+ TestRenderPass* root_pass = AddRenderPass(
render_passes, root_pass_id, viewport_rect, gfx::Transform());
- addQuad(root_pass, viewport_rect, SK_ColorGREEN);
+ AddQuad(root_pass, viewport_rect, SK_ColorGREEN);
RenderPass::Id child_pass_id(2, 0);
- TestRenderPass* child_pass = addRenderPass(
+ TestRenderPass* child_pass = AddRenderPass(
render_passes, child_pass_id, viewport_rect, gfx::Transform());
- addQuad(child_pass, viewport_rect, SK_ColorBLUE);
+ AddQuad(child_pass, viewport_rect, SK_ColorBLUE);
- addRenderPassQuad(root_pass, child_pass);
+ AddRenderPassQuad(root_pass, child_pass);
// First render pass is not the root one, clearing should happen.
EXPECT_CALL(*mock_context, clear(GL_COLOR_BUFFER_BIT)).Times(AtLeast(1));
@@ -884,23 +884,23 @@ TEST(GLRendererTest2, ScissorTestWhenClearing) {
gfx::Rect grand_child_rect(25, 25);
RenderPass::Id grand_child_pass_id(3, 0);
- TestRenderPass* grand_child_pass = addRenderPass(
+ TestRenderPass* grand_child_pass = AddRenderPass(
render_passes, grand_child_pass_id, grand_child_rect, gfx::Transform());
- addClippedQuad(grand_child_pass, grand_child_rect, SK_ColorYELLOW);
+ 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());
- addQuad(child_pass, child_rect, SK_ColorBLUE);
+ 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(
+ TestRenderPass* root_pass = AddRenderPass(
render_passes, root_pass_id, viewport_rect, gfx::Transform());
- addQuad(root_pass, viewport_rect, SK_ColorGREEN);
+ AddQuad(root_pass, viewport_rect, SK_ColorGREEN);
- addRenderPassQuad(root_pass, child_pass);
- addRenderPassQuad(child_pass, grand_child_pass);
+ AddRenderPassQuad(root_pass, child_pass);
+ AddRenderPassQuad(child_pass, grand_child_pass);
renderer.DecideRenderPassAllocationsForFrame(
*mock_client.render_passes_in_draw_order());
@@ -964,9 +964,9 @@ class MockOutputSurfaceTest : public testing::Test, public FakeRendererClient {
render_passes->clear();
RenderPass::Id render_pass_id(1, 0);
- TestRenderPass* render_pass = addRenderPass(
+ TestRenderPass* render_pass = AddRenderPass(
*render_passes, render_pass_id, viewport_rect, gfx::Transform());
- addQuad(render_pass, viewport_rect, SK_ColorGREEN);
+ AddQuad(render_pass, viewport_rect, SK_ColorGREEN);
EXPECT_CALL(output_surface_, EnsureBackbuffer()).WillRepeatedly(Return());
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 34ba8d0..f084788 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -58,10 +58,10 @@ bool OutputSurface::BindToClient(
if (!context3d_->makeContextCurrent())
return false;
- string extensionsString = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS));
- vector<string> extensionsList;
- base::SplitString(extensionsString, ' ', &extensionsList);
- set<string> extensions(extensionsList.begin(), extensionsList.end());
+ string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS));
+ vector<string> extensions_list;
+ base::SplitString(extensions_string, ' ', &extensions_list);
+ set<string> extensions(extensions_list.begin(), extensions_list.end());
has_gl_discard_backbuffer_ =
extensions.count("GL_CHROMIUM_discard_backbuffer");
@@ -97,7 +97,7 @@ void OutputSurface::BindFramebuffer() {
void OutputSurface::SwapBuffers() {
DCHECK(context3d_);
- // Note that currently this has the same effect as swapBuffers; we should
+ // Note that currently this has the same effect as SwapBuffers; we should
// consider exposing a different entry point on WebGraphicsContext3D.
context3d_->prepareTexture();
}
diff --git a/cc/output/render_surface_filters.cc b/cc/output/render_surface_filters.cc
index dd5e1a1..2c51fbc 100644
--- a/cc/output/render_surface_filters.cc
+++ b/cc/output/render_surface_filters.cc
@@ -45,7 +45,7 @@ void GetContrastMatrix(float amount, SkScalar matrix[20]) {
}
void GetSaturateMatrix(float amount, SkScalar matrix[20]) {
- // Note, these values are computed to ensure matrixNeedsClamping is false
+ // Note, these values are computed to ensure MatrixNeedsClamping is false
// for amount in [0..1]
matrix[0] = 0.213f + 0.787f * amount;
matrix[1] = 0.715f - 0.715f * amount;
@@ -99,7 +99,7 @@ void GetOpacityMatrix(float amount, SkScalar matrix[20]) {
}
void GetGrayscaleMatrix(float amount, SkScalar matrix[20]) {
- // Note, these values are computed to ensure matrixNeedsClamping is false
+ // Note, these values are computed to ensure MatrixNeedsClamping is false
// for amount in [0..1]
matrix[0] = 0.2126f + 0.7874f * amount;
matrix[1] = 0.7152f - 0.7152f * amount;
@@ -323,10 +323,10 @@ WebKit::WebFilterOperations RenderSurfaceFilters::Optimize(
SkScalar matrix[20];
if (GetColorMatrix(op, matrix)) {
if (have_accumulated_color_matrix) {
- SkScalar newMatrix[20];
- MultColorMatrix(matrix, accumulated_color_matrix, newMatrix);
+ SkScalar new_matrix[20];
+ MultColorMatrix(matrix, accumulated_color_matrix, new_matrix);
memcpy(accumulated_color_matrix,
- newMatrix,
+ new_matrix,
sizeof(accumulated_color_matrix));
} else {
memcpy(accumulated_color_matrix,
diff --git a/cc/output/software_output_device.cc b/cc/output/software_output_device.cc
index 37efb64..e63322a 100644
--- a/cc/output/software_output_device.cc
+++ b/cc/output/software_output_device.cc
@@ -42,11 +42,11 @@ void SoftwareOutputDevice::EndPaint(SoftwareFrameData* frame_data) {
void SoftwareOutputDevice::CopyToBitmap(
gfx::Rect rect, SkBitmap* output) {
DCHECK(device_);
- SkIRect invertRect = SkIRect::MakeXYWH(
+ SkIRect invert_rect = SkIRect::MakeXYWH(
rect.x(), viewport_size_.height() - rect.bottom(),
rect.width(), rect.height());
const SkBitmap& bitmap = device_->accessBitmap(false);
- bitmap.extractSubset(output, invertRect);
+ bitmap.extractSubset(output, invert_rect);
}
void SoftwareOutputDevice::Scroll(
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 0806418..3b97ea0 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -270,8 +270,10 @@ void SoftwareRenderer::DrawDebugBorderQuad(const DrawingFrame& frame,
// We need to apply the matrix manually to have pixel-sized stroke width.
SkPoint vertices[4];
gfx::RectFToSkRect(QuadVertexRect()).toQuad(vertices);
- SkPoint transformedVertices[4];
- current_canvas_->getTotalMatrix().mapPoints(transformedVertices, vertices, 4);
+ SkPoint transformed_vertices[4];
+ current_canvas_->getTotalMatrix().mapPoints(transformed_vertices,
+ vertices,
+ 4);
current_canvas_->resetMatrix();
current_paint_.setColor(quad->color);
@@ -279,7 +281,7 @@ void SoftwareRenderer::DrawDebugBorderQuad(const DrawingFrame& frame,
current_paint_.setStyle(SkPaint::kStroke_Style);
current_paint_.setStrokeWidth(quad->width);
current_canvas_->drawPoints(SkCanvas::kPolygon_PointMode,
- 4, transformedVertices, current_paint_);
+ 4, transformed_vertices, current_paint_);
}
void SoftwareRenderer::DrawSolidColorQuad(const DrawingFrame& frame,
diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc
index 61559ad..b58e148 100644
--- a/cc/output/software_renderer_unittest.cc
+++ b/cc/output/software_renderer_unittest.cc
@@ -218,8 +218,8 @@ 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());
- addQuad(root_clear_pass, viewport_rect, SK_ColorGREEN);
+ AddRenderPass(list, root_clear_pass_id, viewport_rect, gfx::Transform());
+ AddQuad(root_clear_pass, viewport_rect, SK_ColorGREEN);
renderer()->DecideRenderPassAllocationsForFrame(list);
renderer()->DrawFrame(list);
@@ -235,9 +235,9 @@ TEST_F(SoftwareRendererTest, ShouldClearRootRenderPass) {
gfx::Rect smaller_rect(20, 20, 60, 60);
RenderPass::Id root_smaller_pass_id(2, 0);
- TestRenderPass* root_smaller_pass = addRenderPass(
+ TestRenderPass* root_smaller_pass = AddRenderPass(
list, root_smaller_pass_id, viewport_rect, gfx::Transform());
- addQuad(root_smaller_pass, smaller_rect, SK_ColorMAGENTA);
+ AddQuad(root_smaller_pass, smaller_rect, SK_ColorMAGENTA);
renderer()->DecideRenderPassAllocationsForFrame(list);
renderer()->DrawFrame(list);
diff --git a/cc/quads/draw_quad.h b/cc/quads/draw_quad.h
index 952472d..2636a07 100644
--- a/cc/quads/draw_quad.h
+++ b/cc/quads/draw_quad.h
@@ -53,7 +53,7 @@ class CC_EXPORT DrawQuad {
gfx::Rect opaque_rect;
// Allows changing the rect that gets drawn to make it smaller. This value
- // should be clipped to quadRect.
+ // should be clipped to |rect|.
gfx::Rect visible_rect;
// By default blending is used when some part of the quad is not opaque.
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index 496602c..281da3b 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -192,22 +192,22 @@ void CompareDrawQuad(DrawQuad* quad,
} \
SETUP_AND_COPY_QUAD_ALL(Type, quad_all);
-#define CREATE_QUAD_5_NEW_1(Type, a, b, c, d, e, copyA) \
+#define CREATE_QUAD_5_NEW_1(Type, a, b, c, d, e, copy_a) \
scoped_ptr<Type> quad_new(Type::Create()); \
{ \
QUAD_DATA \
quad_new->SetNew(shared_state.get(), quad_rect, a, b, c, d, e); \
} \
- SETUP_AND_COPY_QUAD_NEW_1(Type, quad_new, copyA);
+ SETUP_AND_COPY_QUAD_NEW_1(Type, quad_new, copy_a);
-#define CREATE_QUAD_5_ALL_1(Type, a, b, c, d, e, copyA) \
+#define CREATE_QUAD_5_ALL_1(Type, a, b, c, d, e, copy_a) \
scoped_ptr<Type> quad_all(Type::Create()); \
{ \
QUAD_DATA \
quad_all->SetAll(shared_state.get(), quad_rect, quad_opaque_rect, \
quad_visible_rect, needs_blending, a, b, c, d, e); \
} \
- SETUP_AND_COPY_QUAD_ALL_1(Type, quad_all, copyA);
+ SETUP_AND_COPY_QUAD_ALL_1(Type, quad_all, copy_a);
#define CREATE_QUAD_6_NEW(Type, a, b, c, d, e, f) \
scoped_ptr<Type> quad_new(Type::Create()); \
@@ -262,15 +262,15 @@ void CompareDrawQuad(DrawQuad* quad,
} \
SETUP_AND_COPY_QUAD_ALL(Type, quad_all);
-#define CREATE_QUAD_8_NEW_1(Type, a, b, c, d, e, f, g, h, copyA) \
+#define CREATE_QUAD_8_NEW_1(Type, a, b, c, d, e, f, g, h, copy_a) \
scoped_ptr<Type> quad_new(Type::Create()); \
{ \
QUAD_DATA \
quad_new->SetNew(shared_state.get(), quad_rect, a, b, c, d, e, f, g, h); \
} \
- SETUP_AND_COPY_QUAD_NEW_1(Type, quad_new, copyA);
+ SETUP_AND_COPY_QUAD_NEW_1(Type, quad_new, copy_a);
-#define CREATE_QUAD_8_ALL_1(Type, a, b, c, d, e, f, g, h, copyA) \
+#define CREATE_QUAD_8_ALL_1(Type, a, b, c, d, e, f, g, h, copy_a) \
scoped_ptr<Type> quad_all(Type::Create()); \
{ \
QUAD_DATA \
@@ -278,7 +278,7 @@ void CompareDrawQuad(DrawQuad* quad,
quad_visible_rect, needs_blending, \
a, b, c, d, e, f, g, h); \
} \
- SETUP_AND_COPY_QUAD_ALL_1(Type, quad_all, copyA);
+ SETUP_AND_COPY_QUAD_ALL_1(Type, quad_all, copy_a);
#define CREATE_QUAD_9_NEW(Type, a, b, c, d, e, f, g, h, i) \
scoped_ptr<Type> quad_new(Type::Create()); \
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index 6259716..154b02c5 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -28,13 +28,13 @@ class SharedQuadState;
// A list of DrawQuad objects, sorted internally in front-to-back order.
class QuadList : public ScopedPtrVector<DrawQuad> {
public:
- typedef reverse_iterator backToFrontIterator;
- typedef const_reverse_iterator constBackToFrontIterator;
+ typedef reverse_iterator BackToFrontIterator;
+ typedef const_reverse_iterator ConstBackToFrontIterator;
- inline backToFrontIterator backToFrontBegin() { return rbegin(); }
- inline backToFrontIterator backToFrontEnd() { return rend(); }
- inline constBackToFrontIterator backToFrontBegin() const { return rbegin(); }
- inline constBackToFrontIterator backToFrontEnd() const { return rend(); }
+ inline BackToFrontIterator BackToFrontBegin() { return rbegin(); }
+ inline BackToFrontIterator BackToFrontEnd() { return rend(); }
+ inline ConstBackToFrontIterator BackToFrontBegin() const { return rbegin(); }
+ inline ConstBackToFrontIterator BackToFrontEnd() const { return rend(); }
};
typedef ScopedPtrVector<SharedQuadState> SharedQuadStateList;
@@ -64,7 +64,7 @@ class CC_EXPORT RenderPass {
static scoped_ptr<RenderPass> Create();
// A shallow copy of the render pass, which does not include its quads.
- scoped_ptr<RenderPass> Copy(Id newId) const;
+ scoped_ptr<RenderPass> Copy(Id new_id) const;
void SetNew(Id id,
gfx::Rect output_rect,
diff --git a/cc/quads/texture_draw_quad.cc b/cc/quads/texture_draw_quad.cc
index 6b3958f..04c9511 100644
--- a/cc/quads/texture_draw_quad.cc
+++ b/cc/quads/texture_draw_quad.cc
@@ -91,13 +91,13 @@ bool TextureDrawQuad::PerformClipping() {
static_cast<float>(quadTransform().matrix().getDouble(1, 3)));
// Transform the rect by the scale and offset.
- gfx::RectF rectF = rect;
- rectF.Scale(x_scale, y_scale);
- rectF += offset;
+ gfx::RectF rect_f = rect;
+ rect_f.Scale(x_scale, y_scale);
+ rect_f += offset;
// Perform clipping and check to see if the result is empty.
- gfx::RectF clippedRect = IntersectRects(rectF, clipRect());
- if (clippedRect.IsEmpty()) {
+ gfx::RectF clipped_rect = IntersectRects(rect_f, clipRect());
+ if (clipped_rect.IsEmpty()) {
rect = gfx::Rect();
uv_top_left = gfx::PointF();
uv_bottom_right = gfx::PointF();
@@ -106,15 +106,15 @@ bool TextureDrawQuad::PerformClipping() {
// Create a new uv-rect by clipping the old one to the new bounds.
gfx::Vector2dF uv_scale(uv_bottom_right - uv_top_left);
- uv_scale.Scale(1.f / rectF.width(), 1.f / rectF.height());
+ uv_scale.Scale(1.f / rect_f.width(), 1.f / rect_f.height());
uv_bottom_right = uv_top_left +
gfx::ScaleVector2d(
- clippedRect.bottom_right() - rectF.origin(),
+ clipped_rect.bottom_right() - rect_f.origin(),
uv_scale.x(),
uv_scale.y());
uv_top_left = uv_top_left +
gfx::ScaleVector2d(
- clippedRect.origin() - rectF.origin(),
+ clipped_rect.origin() - rect_f.origin(),
uv_scale.x(),
uv_scale.y());
@@ -125,10 +125,10 @@ bool TextureDrawQuad::PerformClipping() {
if (vertex_opacity[0] != vertex_opacity[1]
|| vertex_opacity[0] != vertex_opacity[2]
|| vertex_opacity[0] != vertex_opacity[3]) {
- const float x1 = (clippedRect.x() - rectF.x()) / rectF.width();
- const float y1 = (clippedRect.y() - rectF.y()) / rectF.height();
- const float x3 = (clippedRect.right() - rectF.x()) / rectF.width();
- const float y3 = (clippedRect.bottom() - rectF.y()) / rectF.height();
+ const float x1 = (clipped_rect.x() - rect_f.x()) / rect_f.width();
+ const float y1 = (clipped_rect.y() - rect_f.y()) / rect_f.height();
+ const float x3 = (clipped_rect.right() - rect_f.x()) / rect_f.width();
+ const float y3 = (clipped_rect.bottom() - rect_f.y()) / rect_f.height();
const float x1y1 = x1 * vertex_opacity[2] + (1.0f - x1) * vertex_opacity[1];
const float x1y3 = x1 * vertex_opacity[3] + (1.0f - x1) * vertex_opacity[0];
const float x3y1 = x3 * vertex_opacity[2] + (1.0f - x3) * vertex_opacity[1];
@@ -140,12 +140,12 @@ bool TextureDrawQuad::PerformClipping() {
}
// Move the clipped rectangle back into its space.
- clippedRect -= offset;
- clippedRect.Scale(1.0f / x_scale, 1.0f / y_scale);
- rect = gfx::Rect(static_cast<int>(clippedRect.x() + 0.5f),
- static_cast<int>(clippedRect.y() + 0.5f),
- static_cast<int>(clippedRect.width() + 0.5f),
- static_cast<int>(clippedRect.height() + 0.5f));
+ clipped_rect -= offset;
+ clipped_rect.Scale(1.0f / x_scale, 1.0f / y_scale);
+ rect = gfx::Rect(static_cast<int>(clipped_rect.x() + 0.5f),
+ static_cast<int>(clipped_rect.y() + 0.5f),
+ static_cast<int>(clipped_rect.width() + 0.5f),
+ static_cast<int>(clipped_rect.height() + 0.5f));
return true;
}
diff --git a/cc/resources/bitmap_skpicture_content_layer_updater.h b/cc/resources/bitmap_skpicture_content_layer_updater.h
index 07bef12..63ca4a1 100644
--- a/cc/resources/bitmap_skpicture_content_layer_updater.h
+++ b/cc/resources/bitmap_skpicture_content_layer_updater.h
@@ -10,9 +10,9 @@
namespace cc {
-// This class records the contentRect into an SkPicture, then software
+// This class records the content_rect into an SkPicture, then software
// rasterizes the SkPicture into bitmaps for each tile. This implements
-// Settings::perTilePainting.
+// LayerTreeSettingSettings::per_tile_painting_enabled.
class BitmapSkPictureContentLayerUpdater : public SkPictureContentLayerUpdater {
public:
class Resource : public ContentLayerUpdater::Resource {
diff --git a/cc/resources/content_layer_updater.cc b/cc/resources/content_layer_updater.cc
index 4865a49..f11083b 100644
--- a/cc/resources/content_layer_updater.cc
+++ b/cc/resources/content_layer_updater.cc
@@ -28,7 +28,7 @@ void ContentLayerUpdater::PaintContents(SkCanvas* canvas,
float contents_height_scale,
gfx::Rect* resulting_opaque_rect,
RenderingStats* stats) {
- TRACE_EVENT0("cc", "ContentLayerUpdater::paintContents");
+ TRACE_EVENT0("cc", "ContentLayerUpdater::PaintContents");
canvas->save();
canvas->translate(SkFloatToScalar(-content_rect.x()),
SkFloatToScalar(-content_rect.y()));
diff --git a/cc/resources/content_layer_updater.h b/cc/resources/content_layer_updater.h
index bedc614..80b8a48 100644
--- a/cc/resources/content_layer_updater.h
+++ b/cc/resources/content_layer_updater.h
@@ -17,7 +17,7 @@ class LayerPainter;
// Base class for BitmapContentLayerUpdater and
// SkPictureContentLayerUpdater that reduces code duplication between
-// their respective paintContents implementations.
+// their respective PaintContents implementations.
class CC_EXPORT ContentLayerUpdater : public LayerUpdater {
protected:
explicit ContentLayerUpdater(scoped_ptr<LayerPainter> painter);
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 8ec6e98..701d8ac 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -17,7 +17,7 @@
namespace {
// URI label for a lazily decoded SkPixelRef.
-const char labelLazyDecoded[] = "lazy";
+const char kLabelLazyDecoded[] = "lazy";
class DisableLCDTextFilter : public SkDrawFilter {
public:
@@ -81,15 +81,15 @@ void Picture::CloneForDrawing(int num_threads) {
void Picture::Record(ContentLayerClient* painter,
RenderingStats* stats,
- const SkTileGridPicture::TileGridInfo& tileGridInfo) {
+ const SkTileGridPicture::TileGridInfo& tile_grid_info) {
TRACE_EVENT2("cc", "Picture::Record",
"width", layer_rect_.width(), "height", layer_rect_.height());
// Record() should only be called once.
DCHECK(!picture_);
- DCHECK(!tileGridInfo.fTileInterval.isEmpty());
+ DCHECK(!tile_grid_info.fTileInterval.isEmpty());
picture_ = skia::AdoptRef(new SkTileGridPicture(
- layer_rect_.width(), layer_rect_.height(), tileGridInfo));
+ layer_rect_.width(), layer_rect_.height(), tile_grid_info));
SkCanvas* canvas = picture_->beginRecording(
layer_rect_.width(),
@@ -171,7 +171,7 @@ void Picture::GatherPixelRefs(const gfx::Rect& layer_rect,
SkPixelRef** refs = reinterpret_cast<SkPixelRef**>(data);
for (unsigned int i = 0; i < pixel_refs->size() / sizeof(SkPixelRef*); ++i) {
if (*refs && (*refs)->getURI() && !strncmp(
- (*refs)->getURI(), labelLazyDecoded, 4)) {
+ (*refs)->getURI(), kLabelLazyDecoded, 4)) {
pixel_ref_list.push_back(static_cast<skia::LazyPixelRef*>(*refs));
}
refs++;
diff --git a/cc/resources/picture.h b/cc/resources/picture.h
index 9d08bfa..3cb6791 100644
--- a/cc/resources/picture.h
+++ b/cc/resources/picture.h
@@ -44,7 +44,7 @@ class CC_EXPORT Picture
// Record a paint operation. To be able to safely use this SkPicture for
// playback on a different thread this can only be called once.
void Record(ContentLayerClient*, RenderingStats*,
- const SkTileGridPicture::TileGridInfo& tileGridInfo);
+ const SkTileGridPicture::TileGridInfo& tile_grid_info);
// Has Record() been called yet?
bool HasRecording() const { return picture_.get() != NULL; }
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 1cc6190..3d97b43 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -233,10 +233,10 @@ void PicturePileImpl::AnalyzeInRect(const gfx::Rect& content_rect,
gfx::Rect layer_rect = gfx::ToEnclosingRect(
gfx::ScaleRect(content_rect, 1.f / contents_scale));
- SkBitmap emptyBitmap;
- emptyBitmap.setConfig(SkBitmap::kNo_Config, content_rect.width(),
+ SkBitmap empty_bitmap;
+ empty_bitmap.setConfig(SkBitmap::kNo_Config, content_rect.width(),
content_rect.height());
- skia::AnalysisDevice device(emptyBitmap);
+ skia::AnalysisDevice device(empty_bitmap);
skia::AnalysisCanvas canvas(&device);
int64 total_pixels_rasterized = 0;
diff --git a/cc/resources/picture_pile_impl.h b/cc/resources/picture_pile_impl.h
index 2f2fe00..6e76fc2 100644
--- a/cc/resources/picture_pile_impl.h
+++ b/cc/resources/picture_pile_impl.h
@@ -29,7 +29,7 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase {
// Raster a subrect of this PicturePileImpl into the given canvas.
// It's only safe to call paint on a cloned version.
- // It is assumed that contentsScale has already been applied to this canvas.
+ // It is assumed that contents_scale has already been applied to this canvas.
void Raster(
SkCanvas* canvas,
gfx::Rect canvas_rect,
diff --git a/cc/resources/prioritized_resource_manager.cc b/cc/resources/prioritized_resource_manager.cc
index e3eea72..2c406df 100644
--- a/cc/resources/prioritized_resource_manager.cc
+++ b/cc/resources/prioritized_resource_manager.cc
@@ -307,17 +307,17 @@ void PrioritizedResourceManager::ReduceWastedMemory(
// we really need very little memory. This should probably be solved by
// reducing the limit externally, but until then this just does some "clean
// up" of unused backing textures (any more than 10%).
- size_t wastedMemory = 0;
+ size_t wasted_memory = 0;
for (BackingList::iterator it = backings_.begin(); it != backings_.end();
++it) {
if ((*it)->owner())
break;
- wastedMemory += (*it)->bytes();
+ wasted_memory += (*it)->bytes();
}
- size_t tenPercentOfMemory = memory_available_bytes_ / 10;
- if (wastedMemory > tenPercentOfMemory)
+ size_t ten_percent_of_memory = memory_available_bytes_ / 10;
+ if (wasted_memory > ten_percent_of_memory)
EvictBackingsToReduceMemory(MemoryUseBytes() -
- (wastedMemory - tenPercentOfMemory),
+ (wasted_memory - ten_percent_of_memory),
PriorityCalculator::AllowEverythingCutoff(),
EVICT_ONLY_RECYCLABLE,
DO_NOT_UNLINK_BACKINGS,
@@ -515,7 +515,7 @@ void PrioritizedResourceManager::AssertInvariants() {
// At all times, backings that can be evicted must always come before
// backings that can't be evicted in the backing texture list (otherwise
- // reduceMemory will not find all textures available for eviction/recycling).
+ // ReduceMemory will not find all textures available for eviction/recycling).
bool reached_unrecyclable = false;
PrioritizedResource::Backing* previous_backing = NULL;
for (BackingList::iterator it = backings_.begin(); it != backings_.end();
diff --git a/cc/resources/prioritized_resource_manager.h b/cc/resources/prioritized_resource_manager.h
index 820ed41..b1f013d 100644
--- a/cc/resources/prioritized_resource_manager.h
+++ b/cc/resources/prioritized_resource_manager.h
@@ -82,7 +82,7 @@ class CC_EXPORT PrioritizedResourceManager {
void ClearPriorities();
// Delete contents textures' backing resources until they use only
- // bytesLimit bytes. This may be called on the impl thread while the main
+ // limit_bytes bytes. This may be called on the impl thread while the main
// thread is running. Returns true if resources are indeed evicted as a
// result of this call.
bool ReduceMemoryOnImplThread(size_t limit_bytes,
@@ -189,7 +189,7 @@ class CC_EXPORT PrioritizedResourceManager {
size_t max_memory_limit_bytes_;
// The priority cutoff based on memory pressure. This is not a strict
- // cutoff -- requestLate allows textures with priority equal to this
+ // cutoff -- RequestLate allows textures with priority equal to this
// cutoff to be allowed.
int priority_cutoff_;
// The priority cutoff based on external memory policy. This is a strict
@@ -220,11 +220,11 @@ class CC_EXPORT PrioritizedResourceManager {
TextureVector temp_texture_vector_;
// Statistics about memory usage at priority cutoffs, computed at
- // prioritizeTextures.
+ // PrioritizeTextures.
size_t memory_visible_bytes_;
size_t memory_visible_and_nearby_bytes_;
- // Statistics copied at the time of pushTexturePrioritiesToBackings.
+ // Statistics copied at the time of PushTexturePrioritiesToBackings.
size_t memory_visible_last_pushed_bytes_;
size_t memory_visible_and_nearby_last_pushed_bytes_;
diff --git a/cc/resources/prioritized_resource_unittest.cc b/cc/resources/prioritized_resource_unittest.cc
index 7b10d72..98e4985 100644
--- a/cc/resources/prioritized_resource_unittest.cc
+++ b/cc/resources/prioritized_resource_unittest.cc
@@ -623,7 +623,7 @@ TEST_F(PrioritizedResourceTest, RequestLateBackingsSorting) {
EXPECT_TRUE(ValidateTexture(textures[i], false));
// Drop the memory limit and prioritize (none will be above the threshold,
- // but they still have backings because reduceMemory hasn't been called).
+ // but they still have backings because ReduceMemory hasn't been called).
resource_manager->SetMaxMemoryLimitBytes(
TexturesMemorySize(max_textures / 2));
PrioritizeTexturesAndBackings(resource_manager.get());
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index a1246f4..d8de6f5 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -87,7 +87,7 @@ class ContextSharedData {
// If the latest sync point the context has waited on is before the sync
// point for when the mailbox was set, pretend we never saw that
- // produceTexture.
+ // ProduceTexture.
if (sync_point_for_mailbox_[mailbox] > sync_point) {
NOTREACHED();
return scoped_ptr<Texture>();
@@ -233,7 +233,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
ASSERT_EQ(target, GL_TEXTURE_2D);
// Delay moving the texture into the mailbox until the next
- // insertSyncPoint, so that it is not visible to other contexts that
+ // InsertSyncPoint, so that it is not visible to other contexts that
// haven't waited on that sync point.
scoped_ptr<PendingProduceTexture> pending(new PendingProduceTexture);
memcpy(pending->mailbox, mailbox, sizeof(pending->mailbox));
@@ -840,13 +840,13 @@ TEST_P(ResourceProviderTest, ScopedSampler) {
if (GetParam() != ResourceProvider::GLTexture)
return;
- scoped_ptr<OutputSurface> outputSurface(
+ scoped_ptr<OutputSurface> output_surface(
FakeOutputSurface::Create3d(scoped_ptr<WebKit::WebGraphicsContext3D>(
new TextureStateTrackingContext)));
TextureStateTrackingContext* context =
- static_cast<TextureStateTrackingContext*>(outputSurface->context3d());
+ static_cast<TextureStateTrackingContext*>(output_surface->context3d());
scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(outputSurface.get()));
+ ResourceProvider::Create(output_surface.get()));
gfx::Size size(1, 1);
WGC3Denum format = GL_RGBA;
@@ -913,13 +913,13 @@ TEST_P(ResourceProviderTest, ManagedResource) {
if (GetParam() != ResourceProvider::GLTexture)
return;
- scoped_ptr<OutputSurface> outputSurface(
+ scoped_ptr<OutputSurface> output_surface(
FakeOutputSurface::Create3d(scoped_ptr<WebKit::WebGraphicsContext3D>(
new TextureStateTrackingContext)));
TextureStateTrackingContext* context =
- static_cast<TextureStateTrackingContext*>(outputSurface->context3d());
+ static_cast<TextureStateTrackingContext*>(output_surface->context3d());
scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(outputSurface.get()));
+ ResourceProvider::Create(output_surface.get()));
gfx::Size size(1, 1);
WGC3Denum format = GL_RGBA;
@@ -1002,7 +1002,7 @@ TEST_P(ResourceProviderTest, TextureAllocation) {
scoped_ptr<WebKit::WebGraphicsContext3D> mock_context(
static_cast<WebKit::WebGraphicsContext3D*>(
new NiceMock<AllocationTrackingContext3D>));
- scoped_ptr<OutputSurface> outputSurface(
+ scoped_ptr<OutputSurface> output_surface(
FakeOutputSurface::Create3d(mock_context.Pass()));
gfx::Size size(2, 2);
@@ -1014,9 +1014,9 @@ TEST_P(ResourceProviderTest, TextureAllocation) {
int texture_id = 123;
AllocationTrackingContext3D* context =
- static_cast<AllocationTrackingContext3D*>(outputSurface->context3d());
+ static_cast<AllocationTrackingContext3D*>(output_surface->context3d());
scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(outputSurface.get()));
+ ResourceProvider::Create(output_surface.get()));
// Lazy allocation. Don't allocate when creating the resource.
EXPECT_CALL(*context, createTexture()).WillOnce(Return(texture_id));
@@ -1042,7 +1042,7 @@ TEST_P(ResourceProviderTest, TextureAllocation) {
resource_provider->DeleteResource(id);
Mock::VerifyAndClearExpectations(context);
- // Same for setPixelsFromBuffer
+ // Same for SetPixelsFromBuffer
EXPECT_CALL(*context, createTexture()).WillOnce(Return(texture_id));
EXPECT_CALL(*context, deleteTexture(texture_id)).Times(1);
EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, texture_id)).Times(3);
@@ -1078,7 +1078,7 @@ TEST_P(ResourceProviderTest, ForcingAsyncUploadToComplete) {
scoped_ptr<WebKit::WebGraphicsContext3D> mock_context(
static_cast<WebKit::WebGraphicsContext3D*>(
new NiceMock<AllocationTrackingContext3D>));
- scoped_ptr<OutputSurface> outputSurface(
+ scoped_ptr<OutputSurface> output_surface(
FakeOutputSurface::Create3d(mock_context.Pass()));
gfx::Size size(2, 2);
@@ -1087,9 +1087,9 @@ TEST_P(ResourceProviderTest, ForcingAsyncUploadToComplete) {
int texture_id = 123;
AllocationTrackingContext3D* context =
- static_cast<AllocationTrackingContext3D*>(outputSurface->context3d());
+ static_cast<AllocationTrackingContext3D*>(output_surface->context3d());
scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(outputSurface.get()));
+ ResourceProvider::Create(output_surface.get()));
EXPECT_CALL(*context, createTexture()).WillOnce(Return(texture_id));
EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, texture_id)).Times(3);
@@ -1113,7 +1113,7 @@ TEST_P(ResourceProviderTest, AbortForcedAsyncUpload) {
scoped_ptr<WebKit::WebGraphicsContext3D> mock_context(
static_cast<WebKit::WebGraphicsContext3D*>(
new NiceMock<AllocationTrackingContext3D>));
- scoped_ptr<OutputSurface> outputSurface(
+ scoped_ptr<OutputSurface> output_surface(
FakeOutputSurface::Create3d(mock_context.Pass()));
gfx::Size size(2, 2);
@@ -1122,9 +1122,9 @@ TEST_P(ResourceProviderTest, AbortForcedAsyncUpload) {
int texture_id = 123;
AllocationTrackingContext3D* context =
- static_cast<AllocationTrackingContext3D*>(outputSurface->context3d());
+ static_cast<AllocationTrackingContext3D*>(output_surface->context3d());
scoped_ptr<ResourceProvider> resource_provider(
- ResourceProvider::Create(outputSurface.get()));
+ ResourceProvider::Create(output_surface.get()));
EXPECT_CALL(*context, createTexture()).WillRepeatedly(Return(texture_id));
EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, texture_id)).Times(4);
diff --git a/cc/resources/resource_update_controller.cc b/cc/resources/resource_update_controller.cc
index baae7a9..3936b4d 100644
--- a/cc/resources/resource_update_controller.cc
+++ b/cc/resources/resource_update_controller.cc
@@ -34,13 +34,13 @@ const double kUploaderBusyTickRate = 0.001;
const size_t kMaxBlockingUpdateIntervals = 4;
skia::RefPtr<SkCanvas> CreateAcceleratedCanvas(
- GrContext* gr_context, gfx::Size canvasSize, unsigned textureId) {
+ GrContext* gr_context, gfx::Size canvas_size, unsigned texture_id) {
GrBackendTextureDesc texture_desc;
texture_desc.fFlags = kRenderTarget_GrBackendTextureFlag;
- texture_desc.fWidth = canvasSize.width();
- texture_desc.fHeight = canvasSize.height();
+ texture_desc.fWidth = canvas_size.width();
+ texture_desc.fHeight = canvas_size.height();
texture_desc.fConfig = kSkia8888_GrPixelConfig;
- texture_desc.fTextureHandle = textureId;
+ texture_desc.fTextureHandle = texture_id;
skia::RefPtr<GrTexture> target =
skia::AdoptRef(gr_context->wrapBackendTexture(texture_desc));
skia::RefPtr<SkDevice> device =
@@ -81,8 +81,8 @@ ResourceUpdateController::ResourceUpdateController(
ResourceUpdateController::~ResourceUpdateController() {}
void ResourceUpdateController::PerformMoreUpdates(
- base::TimeTicks timeLimit) {
- time_limit_ = timeLimit;
+ base::TimeTicks time_limit) {
+ time_limit_ = time_limit;
// Update already in progress.
if (task_posted_)
diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc
index 0ca6ea8..6ce3df8 100644
--- a/cc/resources/skpicture_content_layer_updater.cc
+++ b/cc/resources/skpicture_content_layer_updater.cc
@@ -48,23 +48,23 @@ scoped_ptr<LayerUpdater::Resource> SkPictureContentLayerUpdater::CreateResource(
void SkPictureContentLayerUpdater::PrepareToUpdate(
gfx::Rect content_rect,
gfx::Size,
- float contentsWidthScale,
+ float contents_width_scale,
float contents_height_scale,
- gfx::Rect* resultingOpaqueRect,
+ gfx::Rect* resulting_opaque_rect,
RenderingStats* stats) {
SkCanvas* canvas =
picture_.beginRecording(content_rect.width(), content_rect.height());
PaintContents(canvas,
content_rect,
- contentsWidthScale,
+ contents_width_scale,
contents_height_scale,
- resultingOpaqueRect,
+ resulting_opaque_rect,
stats);
picture_.endRecording();
}
void SkPictureContentLayerUpdater::DrawPicture(SkCanvas* canvas) {
- TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::drawPicture");
+ TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::DrawPicture");
canvas->drawPicture(picture_);
}
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 76c2b89..83223b2 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -95,9 +95,9 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
scoped_ptr<base::Value> BasicStateAsValue() const;
scoped_ptr<base::Value> AllTilesAsValue() const;
- void GetMemoryStats(size_t* memoryRequiredBytes,
- size_t* memoryNiceToHaveBytes,
- size_t* memoryUsedBytes) const;
+ void GetMemoryStats(size_t* memory_required_bytes,
+ size_t* memory_nice_to_have_bytes,
+ size_t* memory_used_bytes) const;
bool HasPendingWorkScheduled(WhichTree tree) const;
const MemoryHistory::Entry& memory_stats_from_last_assign() const {
diff --git a/cc/scheduler/delay_based_time_source.cc b/cc/scheduler/delay_based_time_source.cc
index 48cd31d..4037824 100644
--- a/cc/scheduler/delay_based_time_source.cc
+++ b/cc/scheduler/delay_based_time_source.cc
@@ -51,7 +51,7 @@ DelayBasedTimeSource::DelayBasedTimeSource(base::TimeDelta interval,
DelayBasedTimeSource::~DelayBasedTimeSource() {}
void DelayBasedTimeSource::SetActive(bool active) {
- TRACE_EVENT1("cc", "DelayBasedTimeSource::setActive", "active", active);
+ TRACE_EVENT1("cc", "DelayBasedTimeSource::SetActive", "active", active);
if (!active) {
state_ = STATE_INACTIVE;
weak_factory_.InvalidateWeakPtrs();
@@ -152,7 +152,7 @@ base::TimeTicks DelayBasedTimeSource::Now() const {
// This code tries to achieve an average tick rate as close to interval_ as
// possible. To do this, it has to deal with a few basic issues:
-// 1. postDelayedTask can delay only at a millisecond granularity. So, 16.666
+// 1. PostDelayedTask can delay only at a millisecond granularity. So, 16.666
// has to posted as 16 or 17.
// 2. A delayed task may come back a bit late (a few ms), or really late
// (frames later)
@@ -162,7 +162,7 @@ base::TimeTicks DelayBasedTimeSource::Now() const {
//
// Then, when we post our task, we take the floor of (tick_target_ and Now()).
// If we started at now=0, and 60FPs (all times in milliseconds):
-// now=0 target=16.667 postDelayedTask(16)
+// now=0 target=16.667 PostDelayedTask(16)
//
// When our callback runs, we figure out how far off we were from that goal.
// Because of the flooring operation, and assuming our timer runs exactly when
@@ -172,18 +172,18 @@ base::TimeTicks DelayBasedTimeSource::Now() const {
// Since we can't post a 0.667 ms task to get to now=16, we just treat this as a
// tick. Then, we update target to be 33.333. We now post another task based on
// the difference between our target and now:
-// now=16 tick_target=16.667 newTarget=33.333 -->
-// postDelayedTask(floor(33.333 - 16)) --> postDelayedTask(17)
+// now=16 tick_target=16.667 new_target=33.333 -->
+// PostDelayedTask(floor(33.333 - 16)) --> PostDelayedTask(17)
//
// Over time, with no late tasks, this leads to us posting tasks like this:
-// now=0 tick_target=0 newTarget=16.667 -->
-// tick(), postDelayedTask(16)
-// now=16 tick_target=16.667 newTarget=33.333 -->
-// tick(), postDelayedTask(17)
-// now=33 tick_target=33.333 newTarget=50.000 -->
-// tick(), postDelayedTask(17)
-// now=50 tick_target=50.000 newTarget=66.667 -->
-// tick(), postDelayedTask(16)
+// now=0 tick_target=0 new_target=16.667 -->
+// tick(), PostDelayedTask(16)
+// now=16 tick_target=16.667 new_target=33.333 -->
+// tick(), PostDelayedTask(17)
+// now=33 tick_target=33.333 new_target=50.000 -->
+// tick(), PostDelayedTask(17)
+// now=50 tick_target=50.000 new_target=66.667 -->
+// tick(), PostDelayedTask(16)
//
// We treat delays in tasks differently depending on the amount of delay we
// encounter. Suppose we posted a task with a target=16.667:
@@ -194,16 +194,16 @@ base::TimeTicks DelayBasedTimeSource::Now() const {
// now=25.0 tick_target=16.667
//
// We treat the first case as a tick anyway, and assume the delay was unusual.
-// Thus, we compute the newTarget based on the old timebase:
-// now=18 tick_target=16.667 newTarget=33.333 -->
-// tick(), postDelayedTask(floor(33.333-18)) --> postDelayedTask(15)
+// Thus, we compute the new_target based on the old timebase:
+// now=18 tick_target=16.667 new_target=33.333 -->
+// tick(), PostDelayedTask(floor(33.333-18)) --> PostDelayedTask(15)
// This brings us back to 18+15 = 33, which was where we would have been if the
// task hadn't been late.
//
// For the really late delay, we we move to the next logical tick. The timebase
// is not reset.
-// now=37 tick_target=16.667 newTarget=50.000 -->
-// tick(), postDelayedTask(floor(50.000-37)) --> postDelayedTask(13)
+// now=37 tick_target=16.667 new_target=50.000 -->
+// tick(), PostDelayedTask(floor(50.000-37)) --> PostDelayedTask(13)
base::TimeTicks DelayBasedTimeSource::NextTickTarget(base::TimeTicks now) {
base::TimeDelta new_interval = next_parameters_.interval;
int intervals_elapsed =
diff --git a/cc/scheduler/frame_rate_controller_unittest.cc b/cc/scheduler/frame_rate_controller_unittest.cc
index 9818a66..0ed600a 100644
--- a/cc/scheduler/frame_rate_controller_unittest.cc
+++ b/cc/scheduler/frame_rate_controller_unittest.cc
@@ -134,7 +134,7 @@ TEST(FrameRateControllerTest, TestFrameThrottling_Unthrottled) {
controller.SetClient(&client);
controller.SetMaxFramesPending(2);
- // setActive triggers 1st frame, make sure the vsync callback is called
+ // SetActive triggers 1st frame, make sure the vsync callback is called
controller.SetActive(true);
thread.RunPendingTask();
EXPECT_TRUE(client.VSyncTicked());
@@ -157,7 +157,7 @@ TEST(FrameRateControllerTest, TestFrameThrottling_Unthrottled) {
EXPECT_TRUE(client.VSyncTicked());
client.Reset();
- // DidBeginFrame triggers 3rd frame (> maxFramesPending),
+ // DidBeginFrame triggers 3rd frame (> max_frames_pending),
// make sure the vsync callback is NOT called
controller.DidBeginFrame();
thread.RunPendingTask();
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 8393897..c1da5f2 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -77,13 +77,13 @@ void Scheduler::SetMainThreadNeedsLayerTextures() {
}
void Scheduler::BeginFrameComplete() {
- TRACE_EVENT0("cc", "Scheduler::beginFrameComplete");
+ TRACE_EVENT0("cc", "Scheduler::BeginFrameComplete");
state_machine_.BeginFrameComplete();
ProcessScheduledActions();
}
void Scheduler::BeginFrameAborted() {
- TRACE_EVENT0("cc", "Scheduler::beginFrameAborted");
+ TRACE_EVENT0("cc", "Scheduler::BeginFrameAborted");
state_machine_.BeginFrameAborted();
ProcessScheduledActions();
}
@@ -101,18 +101,18 @@ void Scheduler::SetSwapBuffersCompleteSupported(bool supported) {
}
void Scheduler::DidSwapBuffersComplete() {
- TRACE_EVENT0("cc", "Scheduler::didSwapBuffersComplete");
+ TRACE_EVENT0("cc", "Scheduler::DidSwapBuffersComplete");
frame_rate_controller_->DidFinishFrame();
}
void Scheduler::DidLoseOutputSurface() {
- TRACE_EVENT0("cc", "Scheduler::didLoseOutputSurface");
+ TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface");
state_machine_.DidLoseOutputSurface();
ProcessScheduledActions();
}
void Scheduler::DidRecreateOutputSurface() {
- TRACE_EVENT0("cc", "Scheduler::didRecreateOutputSurface");
+ TRACE_EVENT0("cc", "Scheduler::DidRecreateOutputSurface");
frame_rate_controller_->DidAbortAllPendingFrames();
state_machine_.DidRecreateOutputSurface();
ProcessScheduledActions();
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index 8471acc..63463db 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -102,18 +102,18 @@ class CC_EXPORT SchedulerStateMachine {
// thread to main.
void SetNeedsCommit();
- // As SetNeedsCommit(), but ensures the beginFrame will definitely happen even
+ // As SetNeedsCommit(), but ensures the BeginFrame will definitely happen even
// if we are not visible. After this call we expect to go through the forced
- // commit flow and then return to waiting for a non-forced beginFrame to
+ // commit flow and then return to waiting for a non-forced BeginFrame to
// finish.
void SetNeedsForcedCommit();
// Call this only in response to receiving an ACTION_BEGIN_FRAME
- // from nextState. Indicates that all painting is complete.
+ // from NextAction. Indicates that all painting is complete.
void BeginFrameComplete();
// Call this only in response to receiving an ACTION_BEGIN_FRAME
- // from nextState if the client rejects the beginFrame message.
+ // from NextAction if the client rejects the BeginFrame message.
void BeginFrameAborted();
// Request exclusive access to the textures that back single buffered
@@ -126,7 +126,7 @@ class CC_EXPORT SchedulerStateMachine {
void SetCanBeginFrame(bool can) { can_begin_frame_ = can; }
// Indicates whether drawing would, at this time, make sense.
- // canDraw can be used to supress flashes or checkerboarding
+ // CanDraw can be used to supress flashes or checkerboarding
// when such behavior would be undesirable.
void SetCanDraw(bool can);
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index cc26509..f15bb8f 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -59,7 +59,7 @@ TEST(SchedulerStateMachineTest, TestNextActionBeginsFrameIfNeeded) {
EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.NextAction());
}
- // If commit requested but canBeginFrame is still false, do nothing.
+ // If commit requested but can_begin_frame is still false, do nothing.
{
StateMachine state(default_scheduler_settings);
state.SetCommitState(SchedulerStateMachine::COMMIT_STATE_IDLE);
@@ -85,7 +85,7 @@ TEST(SchedulerStateMachineTest, TestNextActionBeginsFrameIfNeeded) {
EXPECT_FALSE(state.VSyncCallbackNeeded());
}
- // Begin the frame, make sure needsCommit and commitState update correctly.
+ // Begin the frame, make sure needs_commit and commit_state update correctly.
{
StateMachine state(default_scheduler_settings);
state.SetCanBeginFrame(true);
@@ -371,18 +371,18 @@ TEST(SchedulerStateMachineTest, TestNextActionDrawsOnVSync) {
state.SetVisible(true);
}
- // Case 1: needsCommit=false
+ // Case 1: needs_commit=false
EXPECT_NE(SchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE,
state.NextAction());
- // Case 2: needsCommit=true
+ // Case 2: needs_commit=true
state.SetNeedsCommit();
EXPECT_NE(SchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE,
state.NextAction());
}
}
- // When on vsync, or not on vsync but needsForcedRedraw set, should always
+ // When on vsync, or not on vsync but needs_forced_dedraw set, should always
// draw except if you're ready to commit, in which case commit.
for (size_t i = 0; i < num_commit_states; ++i) {
for (size_t j = 0; j < 2; ++j) {
@@ -408,11 +408,11 @@ TEST(SchedulerStateMachineTest, TestNextActionDrawsOnVSync) {
expected_action = SchedulerStateMachine::ACTION_COMMIT;
}
- // Case 1: needsCommit=false.
+ // Case 1: needs_commit=false.
EXPECT_TRUE(state.VSyncCallbackNeeded());
EXPECT_EQ(expected_action, state.NextAction());
- // Case 2: needsCommit=true.
+ // Case 2: needs_commit=true.
state.SetNeedsCommit();
EXPECT_TRUE(state.VSyncCallbackNeeded());
EXPECT_EQ(expected_action, state.NextAction());
@@ -436,11 +436,11 @@ TEST(SchedulerStateMachineTest, TestNoCommitStatesRedrawWhenInvisible) {
if (j == 1)
state.DidEnterVSync();
- // Case 1: needsCommit=false.
+ // Case 1: needs_commit=false.
EXPECT_NE(SchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE,
state.NextAction());
- // Case 2: needsCommit=true.
+ // Case 2: needs_commit=true.
state.SetNeedsCommit();
EXPECT_NE(SchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE,
state.NextAction());
@@ -648,7 +648,7 @@ TEST(SchedulerStateMachineTest, TestGoesInvisibleBeforeBeginFrameCompletes) {
EXPECT_FALSE(state.NeedsCommit());
EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.NextAction());
- // Become invisible and abort the beginFrame.
+ // Become invisible and abort the BeginFrame.
state.SetVisible(false);
state.BeginFrameAborted();
@@ -725,7 +725,7 @@ TEST(SchedulerStateMachineTest,
state.UpdateState(state.NextAction());
// Once the context is recreated, whether we draw should be based on
- // setCanDraw.
+ // SetCanDraw.
state.SetNeedsRedraw(true);
state.DidEnterVSync();
EXPECT_EQ(SchedulerStateMachine::ACTION_DRAW_IF_POSSIBLE, state.NextAction());
diff --git a/cc/scheduler/texture_uploader.cc b/cc/scheduler/texture_uploader.cc
index b5d3422..dd89e8c 100644
--- a/cc/scheduler/texture_uploader.cc
+++ b/cc/scheduler/texture_uploader.cc
@@ -77,12 +77,12 @@ unsigned TextureUploader::Query::Value() {
TextureUploader::TextureUploader(WebKit::WebGraphicsContext3D* context,
bool use_map_tex_sub_image,
- bool useShallowFlush)
+ bool use_shallow_flush)
: context_(context),
num_blocking_texture_uploads_(0),
use_map_tex_sub_image_(use_map_tex_sub_image),
sub_image_size_(0),
- use_shallow_flush_(useShallowFlush),
+ use_shallow_flush_(use_shallow_flush),
num_texture_uploads_since_last_flush_(0) {
for (size_t i = kUploadHistorySizeInitial; i > 0; i--)
textures_per_second_history_.insert(kDefaultEstimatedTexturesPerSecond);
@@ -202,7 +202,7 @@ void TextureUploader::UploadWithTexSubImage(const uint8* image,
base::debug::Alias(&image_rect_height);
base::debug::Alias(&dest_offset_x);
base::debug::Alias(&dest_offset_y);
- TRACE_EVENT0("cc", "TextureUploader::uploadWithTexSubImage");
+ TRACE_EVENT0("cc", "TextureUploader::UploadWithTexSubImage");
// Offset from image-rect to source-rect.
gfx::Vector2d offset(source_rect.origin() - image_rect.origin());
@@ -273,7 +273,7 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image,
base::debug::Alias(&dest_offset_x);
base::debug::Alias(&dest_offset_y);
- TRACE_EVENT0("cc", "TextureUploader::uploadWithMapTexSubImage");
+ TRACE_EVENT0("cc", "TextureUploader::UploadWithMapTexSubImage");
// Offset from image-rect to source-rect.
gfx::Vector2d offset(source_rect.origin() - image_rect.origin());
@@ -308,7 +308,7 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image,
source_rect.height() * image_rect.width() * bytes_per_pixel);
} else {
// Strides not equal, so do a row-by-row memcpy from the
- // paint results into the pixelDest
+ // paint results into the pixel_dest.
for (int row = 0; row < source_rect.height(); ++row) {
memcpy(&pixel_dest[upload_image_stride * row],
&image[bytes_per_pixel *
diff --git a/cc/scheduler/texture_uploader.h b/cc/scheduler/texture_uploader.h
index 46120c9..369348d 100644
--- a/cc/scheduler/texture_uploader.h
+++ b/cc/scheduler/texture_uploader.h
@@ -41,7 +41,7 @@ class CC_EXPORT TextureUploader {
// Let content_rect be a rectangle, and let content_rect be a sub-rectangle of
// content_rect, expressed in the same coordinate system as content_rect. Let
// image be a buffer for content_rect. This function will copy the region
- // corresponding to sourceRect to destOffset in this sub-image.
+ // corresponding to source_rect to dest_offset in this sub-image.
void Upload(const uint8* image,
gfx::Rect content_rect,
gfx::Rect source_rect,
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:
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index e0a505f..698f9643 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -186,9 +186,9 @@ gfx::RectF DamageTracker::TrackDamageFromActiveLayers(
int target_surface_layer_id) {
gfx::RectF damage_rect = gfx::RectF();
- for (unsigned layerIndex = 0; layerIndex < layer_list.size(); ++layerIndex) {
+ for (size_t layer_index = 0; layer_index < layer_list.size(); ++layer_index) {
// Visit layers in back-to-front order.
- LayerImpl* layer = layer_list[layerIndex];
+ LayerImpl* layer = layer_list[layer_index];
if (LayerTreeHostCommon::RenderSurfaceContributesToTarget<LayerImpl>(
layer, target_surface_layer_id))
@@ -263,9 +263,9 @@ void DamageTracker::ExtendDamageForLayer(LayerImpl* layer,
// Property changes take priority over update rects.
//
// This method is called when we want to consider how a layer contributes to
- // its targetRenderSurface, even if that layer owns the targetRenderSurface
- // itself. To consider how a layer's targetSurface contributes to the
- // ancestorSurface, ExtendDamageForRenderSurface() must be called instead.
+ // its target RenderSurface, even if that layer owns the target RenderSurface
+ // itself. To consider how a layer's target surface contributes to the
+ // ancestor surface, ExtendDamageForRenderSurface() must be called instead.
bool layer_is_new = false;
gfx::RectF old_rect_in_target_space =
diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc
index 561210f..610c68f 100644
--- a/cc/trees/damage_tracker_unittest.cc
+++ b/cc/trees/damage_tracker_unittest.cc
@@ -56,7 +56,7 @@ void EmulateDrawingOneFrame(LayerImpl* root) {
// This emulates only steps that are relevant to testing the damage tracker:
// 1. computing the render passes and layerlists
// 2. updating all damage trackers in the correct order
- // 3. resetting all update_rects and propertyChanged flags for all layers
+ // 3. resetting all update_rects and property_changed flags for all layers
// and surfaces.
std::vector<LayerImpl*> render_surface_layer_list;
@@ -138,10 +138,10 @@ class DamageTrackerTest : public testing::Test {
child1->SetAnchorPoint(gfx::PointF());
child1->SetBounds(gfx::Size(30, 30));
child1->SetContentBounds(gfx::Size(30, 30));
- // With a child that drawsContent, opacity will cause the layer to create
- // its own renderSurface. This layer does not draw, but is intended to
- // create its own renderSurface. TODO: setting opacity and
- // forceRenderSurface may be redundant here.
+ // With a child that draws_content, opacity will cause the layer to create
+ // its own RenderSurface. This layer does not draw, but is intended to
+ // create its own RenderSurface. TODO: setting opacity and
+ // ForceRenderSurface may be redundant here.
child1->SetOpacity(0.5f);
child1->SetDrawsContent(false);
child1->SetForceRenderSurface(true);
@@ -231,7 +231,7 @@ TEST_F(DamageTrackerTest, SanityCheckTestTreeWithTwoSurfaces) {
EXPECT_EQ(3u, root->render_surface()->layer_list().size());
EXPECT_EQ(2u, child1->render_surface()->layer_list().size());
- // The render surface for child1 only has a contentRect that encloses
+ // The render surface for child1 only has a content_rect that encloses
// grand_child1 and grand_child2, because child1 does not draw content.
EXPECT_FLOAT_RECT_EQ(gfx::RectF(190.f, 190.f, 16.f, 18.f), child_damage_rect);
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0.f, 0.f, 500.f, 500.f), root_damage_rect);
@@ -545,7 +545,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForBackgroundBlurredChild) {
0);
EXPECT_FLOAT_RECT_EQ(expected_damage_rect, root_damage_rect);
- // CASE 3: Setting this update rect outside the blurred contentBounds of the
+ // CASE 3: Setting this update rect outside the blurred content_bounds of the
// blurred child1 will not cause it to be expanded.
ClearDamageForAllSurfaces(root.get());
root->set_update_rect(gfx::RectF(30.f, 30.f, 2.f, 2.f));
@@ -560,8 +560,8 @@ TEST_F(DamageTrackerTest, VerifyDamageForBackgroundBlurredChild) {
EXPECT_FLOAT_RECT_EQ(expected_damage_rect, root_damage_rect);
- // CASE 4: Setting this update rect inside the blurred contentBounds but
- // outside the original contentBounds of the blurred child1 will
+ // CASE 4: Setting this update rect inside the blurred content_bounds but
+ // outside the original content_bounds of the blurred child1 will
// cause it to be expanded.
ClearDamageForAllSurfaces(root.get());
root->set_update_rect(gfx::RectF(99.f, 99.f, 1.f, 1.f));
@@ -805,13 +805,13 @@ TEST_F(DamageTrackerTest, VerifyDamageForSurfaceChangeFromDescendantLayer) {
TEST_F(DamageTrackerTest, VerifyDamageForSurfaceChangeFromAncestorLayer) {
// An ancestor/owning layer changes that affects the position/transform of
- // the render surface. Note that in this case, the layerPropertyChanged flag
+ // the render surface. Note that in this case, the layer_property_changed flag
// already propagates to the subtree (tested in LayerImpltest), which damages
// the entire child1 surface, but the damage tracker still needs the correct
// logic to compute the exposed region on the root surface.
// FIXME: the expectations of this test case should change when we add
- // support for a unique scissorRect per renderSurface. In that case,
+ // support for a unique scissor_rect per RenderSurface. In that case,
// the child1 surface should be completely unchanged, since we are
// only transforming it, while the root surface would be damaged
// appropriately.
@@ -950,7 +950,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplica) {
// For this test case, we modify grand_child2, and add grand_child3 to extend
// the bounds of child1's surface. This way, we can test reflection changes
- // without changing contentBounds of the surface.
+ // without changing content_bounds of the surface.
grand_child2->SetPosition(gfx::PointF(180.f, 180.f));
{
scoped_ptr<LayerImpl> grand_child3 =
@@ -1211,7 +1211,8 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
LayerImpl* child1 = root->children()[0];
LayerImpl* grand_child1 = child1->children()[0];
- // Verify that the correct replicaOriginTransform is used for the replicaMask
+ // Verify that the correct replica_origin_transform is used for the
+ // replica_mask.
ClearDamageForAllSurfaces(root.get());
// This is not actually the anchor point being tested, but by convention its
@@ -1250,7 +1251,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
// Sanity check that the appropriate render surfaces were created
ASSERT_TRUE(grand_child1->render_surface());
- // A property change on the replicaMask should damage the reflected region on
+ // A property change on the replica_mask should damage the reflected region on
// the target surface.
ClearDamageForAllSurfaces(root.get());
replica_mask_layer->SetStackingOrderChanged(true);
@@ -1290,7 +1291,7 @@ TEST_F(DamageTrackerTest, VerifyDamageWhenForcedFullDamage) {
TEST_F(DamageTrackerTest, VerifyDamageForEmptyLayerList) {
// Though it should never happen, its a good idea to verify that the damage
- // tracker does not crash when it receives an empty layerList.
+ // tracker does not crash when it receives an empty layer_list.
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl_.active_tree(), 1);
root->CreateRenderSurface();
diff --git a/cc/trees/layer_sorter.cc b/cc/trees/layer_sorter.cc
index 16b75fa..ffeb04a 100644
--- a/cc/trees/layer_sorter.cc
+++ b/cc/trees/layer_sorter.cc
@@ -188,11 +188,11 @@ LayerShape::LayerShape(float width,
// Compute the projection of the layer quad onto the z = 0 plane.
- gfx::PointF clippedQuad[8];
+ gfx::PointF clipped_quad[8];
int num_vertices_in_clipped_quad;
MathUtil::MapClippedQuad(draw_transform,
layer_quad,
- clippedQuad,
+ clipped_quad,
num_vertices_in_clipped_quad);
if (num_vertices_in_clipped_quad < 3) {
@@ -201,7 +201,7 @@ LayerShape::LayerShape(float width,
}
projected_bounds =
- MathUtil::ComputeEnclosingRectOfVertices(clippedQuad,
+ MathUtil::ComputeEnclosingRectOfVertices(clipped_quad,
num_vertices_in_clipped_quad);
// NOTE: it will require very significant refactoring and overhead to deal
@@ -209,14 +209,14 @@ LayerShape::LayerShape(float width,
// layer sorting it is equally correct to take a subsection of the polygon
// that can be made into a quad. This will only be incorrect in the case of
// intersecting layers, which are not supported yet anyway.
- projected_quad.set_p1(clippedQuad[0]);
- projected_quad.set_p2(clippedQuad[1]);
- projected_quad.set_p3(clippedQuad[2]);
+ projected_quad.set_p1(clipped_quad[0]);
+ projected_quad.set_p2(clipped_quad[1]);
+ projected_quad.set_p3(clipped_quad[2]);
if (num_vertices_in_clipped_quad >= 4) {
- projected_quad.set_p4(clippedQuad[3]);
+ projected_quad.set_p4(clipped_quad[3]);
} else {
// This will be a degenerate quad that is actually a triangle.
- projected_quad.set_p4(clippedQuad[2]);
+ projected_quad.set_p4(clipped_quad[2]);
}
// Compute the normal of the layer's plane.
@@ -298,7 +298,7 @@ void LayerSorter::CreateGraphNodes(LayerList::iterator first,
void LayerSorter::CreateGraphEdges() {
DVLOG(2) << "Edges:";
- // Fraction of the total zRange below which z differences
+ // Fraction of the total z_range below which z differences
// are not considered reliable.
const float z_threshold_factor = 0.01f;
float z_threshold = z_range_ * z_threshold_factor;
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 5ef698a..20ba6e4 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -701,7 +701,7 @@ void LayerTreeHost::UpdateLayers(Layer* root_layer,
UpdateHudLayer();
- TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::calcDrawProps");
+ TRACE_EVENT0("cc", "LayerTreeHost::UpdateLayers::CalcDrawProps");
LayerTreeHostCommon::CalculateDrawProperties(
root_layer,
device_viewport_size(),
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 27aeb70..7625f4e 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -157,7 +157,7 @@ static gfx::Rect CalculateVisibleContentRect(
if (!layer->render_target()->render_surface()->clip_rect().IsEmpty()) {
// In this case the target surface does clip layers that contribute to
- // it. So, we have to convert the current surface's clipRect from its
+ // it. So, we have to convert the current surface's clip rect from its
// ancestor surface space to the current (descendant) surface
// space. This conversion is done outside this function so that it can
// be cached instead of computing it redundantly for every layer.
@@ -198,8 +198,8 @@ static bool LayerShouldBeSkipped(LayerType* layer) {
//
// Some additional conditions need to be computed at a later point after the
// recursion is finished.
- // - the intersection of render surface content and layer clipRect is empty
- // - the visibleContentRect is empty
+ // - the intersection of render_surface content and layer clip_rect is empty
+ // - the visible_content_rect is empty
//
// Note, if the layer should not have been drawn due to being fully
// transparent, we would have skipped the entire subtree and never made it
@@ -244,7 +244,7 @@ static inline bool SubtreeShouldBeSkipped(Layer* layer) {
}
// Called on each layer that could be drawn after all information from
-// calcDrawProperties has been updated on that layer. May have some false
+// CalcDrawProperties has been updated on that layer. May have some false
// positives (e.g. layers get this called on them but don't actually get drawn).
static inline void UpdateTilePrioritiesForLayer(LayerImpl* layer) {
layer->UpdateTilePriorities();
@@ -352,10 +352,10 @@ gfx::Transform ComputeScrollCompensationForThisLayer(
// -- this transform is the "partial_layer_origin_transform" =
// (parent_matrix * scale(layer->pageScaleDelta()));
//
- // These steps create a matrix that both start and end in targetSurfaceSpace.
- // So this matrix can pre-multiply any fixed-position layer's draw_transform
- // to undo the scroll_deltas -- as long as that fixed position layer is fixed
- // onto the same render_target as this scrolling_layer.
+ // These steps create a matrix that both start and end in target surface
+ // space. So this matrix can pre-multiply any fixed-position layer's
+ // draw_transform to undo the scroll_deltas -- as long as that fixed position
+ // layer is fixed onto the same render_target as this scrolling_layer.
//
gfx::Transform partial_layer_origin_transform = parent_matrix;
@@ -430,7 +430,7 @@ gfx::Transform ComputeScrollCompensationMatrixForChildren(
next_scroll_compensation_matrix = current_scroll_compensation_matrix;
// If the current layer has a non-zero scroll_delta, then we should compute
- // its local scrollCompensation and accumulate it to the
+ // its local scroll compensation and accumulate it to the
// next_scroll_compensation_matrix.
if (!layer->scroll_delta().IsZero()) {
gfx::Transform scroll_compensation_for_this_layer =
@@ -441,7 +441,7 @@ gfx::Transform ComputeScrollCompensationMatrixForChildren(
// If the layer created its own render_surface, we have to adjust
// next_scroll_compensation_matrix. The adjustment allows us to continue
- // using the scrollCompensation on the next surface.
+ // using the scroll compensation on the next surface.
// Step 1 (right-most in the math): transform from the new surface to the
// original ancestor surface
// Step 2: apply the scroll compensation
@@ -621,7 +621,7 @@ static void RoundTranslationComponents(gfx::Transform* transform) {
}
// Recursively walks the layer tree starting at the given node and computes all
-// the necessary transformations, clipRects, render surfaces, etc.
+// the necessary transformations, clip rects, render surfaces, etc.
template <typename LayerType, typename LayerList, typename RenderSurfaceType>
static void CalculateDrawPropertiesInternal(
LayerType* layer,
@@ -681,15 +681,15 @@ static void CalculateDrawPropertiesInternal(
// M[sublayer] is the layer's sublayer transform (also applied at the
// layer's anchor point)
//
- // S[layer2content] is the ratio of a layer's ContentBounds() to its
+ // S[layer2content] is the ratio of a layer's content_bounds() to its
// Bounds().
//
// Some composite transforms can help in understanding the sequence of
// transforms:
- // compositeLayerTransform = Tr[origin2anchor] * M[layer] *
+ // composite_layer_transform = Tr[origin2anchor] * M[layer] *
// Tr[origin2anchor].inverse()
//
- // compositeSublayerTransform = Tr[origin2anchor] * M[sublayer] *
+ // composite_sublayer_transform = Tr[origin2anchor] * M[sublayer] *
// Tr[origin2anchor].inverse()
//
// 4. When a layer (or render surface) is drawn, it is drawn into a "target
@@ -704,17 +704,17 @@ static void CalculateDrawPropertiesInternal(
// Using these definitions, then:
//
// The draw transform for the layer is:
- // M[draw] = M[parent] * Tr[origin] * compositeLayerTransform *
- // S[layer2content] = M[parent] * Tr[layer->Position() + anchor] *
+ // M[draw] = M[parent] * Tr[origin] * composite_layer_transform *
+ // S[layer2content] = M[parent] * Tr[layer->position() + anchor] *
// M[layer] * Tr[anchor2origin] * S[layer2content]
//
// Interpreting the math left-to-right, this transforms from the
// layer's render surface to the origin of the layer in content space.
//
// The screen space transform is:
- // M[screenspace] = M[root] * Tr[origin] * compositeLayerTransform *
+ // M[screenspace] = M[root] * Tr[origin] * composite_layer_transform *
// S[layer2content]
- // = M[root] * Tr[layer->Position() + anchor] * M[layer]
+ // = M[root] * Tr[layer->position() + anchor] * M[layer]
// * Tr[anchor2origin] * S[layer2content]
//
// Interpreting the math left-to-right, this transforms from the root
@@ -724,10 +724,10 @@ static void CalculateDrawPropertiesInternal(
// The transform hierarchy that is passed on to children (i.e. the child's
// parent_matrix) is:
// M[parent]_for_child = M[parent] * Tr[origin] *
- // compositeLayerTransform * compositeSublayerTransform
- // = M[parent] * Tr[layer->Position() + anchor] *
- // M[layer] * Tr[anchor2origin] *
- // compositeSublayerTransform
+ // composite_layer_transform * composite_sublayer_transform
+ // = M[parent] * Tr[layer->position() + anchor] *
+ // M[layer] * Tr[anchor2origin] *
+ // composite_sublayer_transform
//
// and a similar matrix for the full hierarchy with respect to the
// root.
@@ -755,19 +755,19 @@ static void CalculateDrawPropertiesInternal(
//
// The replica draw transform to its target surface origin is:
// M[replicaDraw] = S[deviceScale] * M[surfaceDraw] *
- // Tr[replica->Position() + replica->anchor()] * Tr[replica] *
+ // Tr[replica->position() + replica->anchor()] * Tr[replica] *
// Tr[origin2anchor].inverse() * S[contents_scale].inverse()
//
// The replica draw transform to the root (screen space) origin is:
- // M[replica2root] = M[surface2root] * Tr[replica->Position()] *
+ // M[replica2root] = M[surface2root] * Tr[replica->position()] *
// Tr[replica] * Tr[origin2anchor].inverse()
//
- // If we early-exit anywhere in this function, the drawableContentRect of this
+ // 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.
+ // The root layer cannot skip CalcDrawProperties.
if (!IsRootLayer(layer) && SubtreeShouldBeSkipped(layer))
return;
@@ -782,8 +782,8 @@ static void CalculateDrawPropertiesInternal(
bool subtree_should_be_clipped = false;
// This value is cached on the stack so that we don't have to inverse-project
- // the surface's clipRect redundantly for every layer. This value is the
- // same as the surface's clipRect, except that instead of being described
+ // the surface's clip rect redundantly for every layer. This value is the
+ // same as the surface's clip rect, except that instead of being described
// in the target surface space (i.e. the ancestor surface space), it is
// described in the current surface space.
gfx::Rect clip_rect_for_subtree_in_descendant_space;
@@ -828,7 +828,7 @@ static void CalculateDrawPropertiesInternal(
combined_transform.Translate(position.x(), position.y());
}
- // The layer's contentsSize is determined from the combined_transform, which
+ // The layer's contents_scale is determined from the combined_transform, which
// then informs the layer's draw_transform.
UpdateLayerContentsScale(layer,
combined_transform,
@@ -839,7 +839,7 @@ static void CalculateDrawPropertiesInternal(
// If there is a transformation from the impl thread then it should be at
// the start of the combined_transform, but we don't want it to affect the
// computation of contents_scale above.
- // Note carefully: this is Concat, not Preconcat (implTransform *
+ // Note carefully: this is Concat, not Preconcat (impl_transform *
// combined_transform).
combined_transform.ConcatTransform(layer->impl_transform());
@@ -868,8 +868,8 @@ static void CalculateDrawPropertiesInternal(
layer_draw_properties.target_space_transform.Scale
(1.f / layer->contents_scale_x(), 1.f / layer->contents_scale_y());
- // layerScreenSpaceTransform represents the transform between root layer's
- // "screen space" and local content space.
+ // The layer's screen_space_transform represents the transform between root
+ // layer's "screen space" and local content space.
layer_draw_properties.screen_space_transform = full_hierarchy_matrix;
if (!layer->preserves_3d())
layer_draw_properties.screen_space_transform.FlattenTo2d();
@@ -963,7 +963,7 @@ static void CalculateDrawPropertiesInternal(
// The new render_surface here will correctly clip the entire subtree. So,
// we do not need to continue propagating the clipping state further down
- // the tree. This way, we can avoid transforming clipRects from ancestor
+ // the tree. This way, we can avoid transforming clip rects from ancestor
// target surface space to current target surface space that could cause
// more w < 0 headaches.
subtree_should_be_clipped = false;
@@ -990,7 +990,7 @@ static void CalculateDrawPropertiesInternal(
if (layer->filters().hasFilterThatMovesPixels() || layer->filter())
nearest_ancestor_that_moves_pixels = render_surface;
- // The render surface clipRect is expressed in the space where this surface
+ // The render surface clip rect is expressed in the space where this surface
// draws, i.e. the same space as clip_rect_from_ancestor.
render_surface->SetIsClipped(ancestor_clips_subtree);
if (ancestor_clips_subtree) {
@@ -1044,7 +1044,7 @@ static void CalculateDrawPropertiesInternal(
if (ancestor_clips_subtree)
clip_rect_for_subtree = clip_rect_from_ancestor;
- // The surface's cached clipRect value propagates regardless of what
+ // The surface's cached clip rect value propagates regardless of what
// clipping goes on between layers here.
clip_rect_for_subtree_in_descendant_space =
clip_rect_from_ancestor_in_descendant_space;
@@ -1135,8 +1135,8 @@ static void CalculateDrawPropertiesInternal(
return;
}
- // Compute the total drawableContentRect for this subtree (the rect is in
- // targetSurface space).
+ // Compute the total drawable_content_rect for this subtree (the rect is in
+ // target surface space).
gfx::Rect local_drawable_content_rect_of_subtree =
accumulated_drawable_content_rect_of_children;
if (layer->DrawsContent())
@@ -1144,7 +1144,7 @@ static void CalculateDrawPropertiesInternal(
if (subtree_should_be_clipped)
local_drawable_content_rect_of_subtree.Intersect(clip_rect_for_subtree);
- // Compute the layer's drawable content rect (the rect is in targetSurface
+ // Compute the layer's drawable content rect (the rect is in target surface
// space).
layer_draw_properties.drawable_content_rect = rect_in_target_space;
if (subtree_should_be_clipped) {
@@ -1153,14 +1153,14 @@ static void CalculateDrawPropertiesInternal(
}
// Tell the layer the rect that is clipped by. In theory we could use a
- // tighter clipRect here (drawableContentRect), but that actually does not
+ // tighter clip rect here (drawable_content_rect), but that actually does not
// reduce how much would be drawn, and instead it would create unnecessary
// changes to scissor state affecting GPU performance.
layer_draw_properties.is_clipped = subtree_should_be_clipped;
if (subtree_should_be_clipped) {
layer_draw_properties.clip_rect = clip_rect_for_subtree;
} else {
- // Initialize the clipRect to a safe value that will not clip the
+ // Initialize the clip rect to a safe value that will not clip the
// layer, just in case clipping is still accidentally used.
layer_draw_properties.clip_rect = rect_in_target_space;
}
@@ -1299,8 +1299,8 @@ void LayerTreeHostCommon::CalculateDrawProperties(
device_scale_transform.Scale(device_scale_factor, device_scale_factor);
std::vector<scoped_refptr<Layer> > dummy_layer_list;
- // The root layer's render_surface should receive the deviceViewport as the
- // initial clipRect.
+ // The root layer's render_surface should receive the device viewport as the
+ // initial clip rect.
bool subtree_should_be_clipped = true;
gfx::Rect device_viewport_rect(gfx::Point(), device_viewport_size);
bool update_tile_priorities = false;
@@ -1332,7 +1332,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
// The dummy layer list should not have been used.
DCHECK_EQ(dummy_layer_list.size(), 0);
// A root layer render_surface should always exist after
- // calculateDrawProperties.
+ // CalculateDrawProperties.
DCHECK(root_layer->render_surface());
}
@@ -1352,8 +1352,8 @@ void LayerTreeHostCommon::CalculateDrawProperties(
std::vector<LayerImpl*> dummy_layer_list;
LayerSorter layer_sorter;
- // The root layer's render_surface should receive the deviceViewport as the
- // initial clipRect.
+ // The root layer's render_surface should receive the device viewport as the
+ // initial clip rect.
bool subtree_should_be_clipped = true;
gfx::Rect device_viewport_rect(gfx::Point(), device_viewport_size);
@@ -1385,7 +1385,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
// The dummy layer list should not have been used.
DCHECK_EQ(dummy_layer_list.size(), 0);
// A root layer render_surface should always exist after
- // calculateDrawProperties.
+ // CalculateDrawProperties.
DCHECK(root_layer->render_surface());
}
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 7644c91..84ad8c1 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -98,8 +98,8 @@ bool LayerTreeHostCommon::RenderSurfaceContributesToTarget(
// A layer will either contribute its own content, or its render surface's
// content, to the target surface. The layer contributes its surface's content
// when both the following are true:
- // (1) The layer actually has a renderSurface, and
- // (2) The layer's renderSurface is not the same as the targetSurface.
+ // (1) The layer actually has a render surface, and
+ // (2) The layer's render surface is not the same as the target surface.
//
// Otherwise, the layer just contributes itself to the target surface.
@@ -131,12 +131,12 @@ template <class Function, typename LayerType>
void LayerTreeHostCommon::CallFunctionForSubtree(LayerType* root_layer) {
Function()(root_layer);
- if (LayerType* maskLayer = root_layer->mask_layer())
- Function()(maskLayer);
- if (LayerType* replicaLayer = root_layer->replica_layer()) {
- Function()(replicaLayer);
- if (LayerType* maskLayer = replicaLayer->mask_layer())
- Function()(maskLayer);
+ if (LayerType* mask_layer = root_layer->mask_layer())
+ Function()(mask_layer);
+ if (LayerType* replica_layer = root_layer->replica_layer()) {
+ Function()(replica_layer);
+ if (LayerType* mask_layer = replica_layer->mask_layer())
+ Function()(mask_layer);
}
for (size_t i = 0; i < root_layer->children().size(); ++i) {
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f2fb51c..36659f5 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -710,9 +710,9 @@ static void RemoveRenderPassesRecursive(RenderPass::Id remove_render_pass_id,
// Now follow up for all RenderPass quads and remove their RenderPasses
// recursively.
const QuadList& quad_list = removed_pass->quad_list;
- QuadList::constBackToFrontIterator quad_list_iterator =
- quad_list.backToFrontBegin();
- for (; quad_list_iterator != quad_list.backToFrontEnd();
+ QuadList::ConstBackToFrontIterator quad_list_iterator =
+ quad_list.BackToFrontBegin();
+ for (; quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
DrawQuad* current_quad = (*quad_list_iterator);
if (current_quad->material != DrawQuad::RENDER_PASS)
@@ -750,9 +750,9 @@ bool LayerTreeHostImpl::CullRenderPassesWithNoQuads::ShouldRemoveRenderPass(
// If any quad or RenderPass draws into this RenderPass, then keep it.
const QuadList& quad_list = render_pass->quad_list;
- for (QuadList::constBackToFrontIterator quad_list_iterator =
- quad_list.backToFrontBegin();
- quad_list_iterator != quad_list.backToFrontEnd();
+ for (QuadList::ConstBackToFrontIterator quad_list_iterator =
+ quad_list.BackToFrontBegin();
+ quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
DrawQuad* current_quad = *quad_list_iterator;
@@ -784,10 +784,10 @@ void LayerTreeHostImpl::RemoveRenderPasses(RenderPassCuller culler,
it = culler.RenderPassListNext(it)) {
const RenderPass* current_pass = frame->render_passes[it];
const QuadList& quad_list = current_pass->quad_list;
- QuadList::constBackToFrontIterator quad_list_iterator =
- quad_list.backToFrontBegin();
+ QuadList::ConstBackToFrontIterator quad_list_iterator =
+ quad_list.BackToFrontBegin();
- for (; quad_list_iterator != quad_list.backToFrontEnd();
+ for (; quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
DrawQuad* current_quad = *quad_list_iterator;
@@ -1041,10 +1041,10 @@ gfx::SizeF LayerTreeHostImpl::VisibleViewportSize() const {
clip_layer->masks_to_bounds())
dip_size = clip_layer->bounds();
- float topOffset =
+ float top_offset =
top_controls_manager_ ? top_controls_manager_->content_top_offset() : 0.f;
return gfx::SizeF(dip_size.width(),
- dip_size.height() - topOffset - overdraw_bottom_height_);
+ dip_size.height() - top_offset - overdraw_bottom_height_);
}
const LayerTreeSettings& LayerTreeHostImpl::Settings() const {
@@ -1359,7 +1359,7 @@ bool LayerTreeHostImpl::EnsureRenderSurfaceLayerList() {
InputHandlerClient::ScrollStatus LayerTreeHostImpl::ScrollBegin(
gfx::Point viewport_point, InputHandlerClient::ScrollInputType type) {
- TRACE_EVENT0("cc", "LayerTreeHostImpl::scrollBegin");
+ TRACE_EVENT0("cc", "LayerTreeHostImpl::ScrollBegin");
if (top_controls_manager_)
top_controls_manager_->ScrollBegin();
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 10fb24a..e69291d 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -139,7 +139,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
void SetAnticipatedDrawTime(base::TimeTicks time);
// Returns false if problems occured preparing the frame, and we should try
- // to avoid displaying the frame. If prepareToDraw is called, DidDrawAllLayers
+ // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers
// must also be called, regardless of whether DrawLayers is called between the
// two.
virtual bool PrepareToDraw(FrameData* frame);
@@ -250,7 +250,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
void SendManagedMemoryStats(
size_t memory_visible_bytes,
size_t memory_visible_and_nearby_bytes,
- size_t memoryUseBytes);
+ size_t memory_use_bytes);
FrameRateCounter* fps_counter() {
return fps_counter_.get();
@@ -365,17 +365,17 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,
void AnimateTopControls(base::TimeTicks monotonic_time);
gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
- LayerImpl* layerImpl,
- float scaleFromViewportToScreenSpace,
- gfx::PointF viewportPoint,
- gfx::Vector2dF viewportDelta);
+ LayerImpl* layer_impl,
+ float scale_from_viewport_to_screen_space,
+ gfx::PointF viewport_point,
+ gfx::Vector2dF viewport_delta);
void UpdateMaxScrollOffset();
void TrackDamageForAllSurfaces(LayerImpl* root_draw_layer,
const LayerList& render_surface_layer_list);
// Returns false if the frame should not be displayed. This function should
- // only be called from prepareToDraw, as didDrawAllLayers must be called
+ // only be called from PrepareToDraw, as DidDrawAllLayers must be called
// if this helper function is called.
bool CalculateRenderPasses(FrameData* frame);
void SetBackgroundTickingEnabled(bool enabled);
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 72abb15..8be65f1 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -42,7 +42,7 @@ class TestLayer : public Layer {
TestLayer() : Layer() {
SetIsDrawable(true);
}
- virtual ~TestLayer() { }
+ virtual ~TestLayer() {}
Region occlusion_;
Region expected_occlusion_;
@@ -111,8 +111,8 @@ class LayerTreeHostOcclusionTestOcclusionSurfaceClipping :
public LayerTreeHostOcclusionTest {
public:
virtual void SetupTree() OVERRIDE {
- // The child layer is a surface and the grandChild is opaque, but clipped to
- // the child and root
+ // The child layer is a surface and the grand_child is opaque, but clipped
+ // to the child and root
SetLayerPropertiesForTesting(
root_.get(), NULL, identity_matrix_,
gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
@@ -342,10 +342,10 @@ class LayerTreeHostOcclusionTestOcclusionOpacityFilter :
public LayerTreeHostOcclusionTest {
public:
virtual void SetupTree() OVERRIDE {
- gfx::Transform childTransform;
- childTransform.Translate(250.0, 250.0);
- childTransform.Rotate(90.0);
- childTransform.Translate(-250.0, -250.0);
+ gfx::Transform child_transform;
+ child_transform.Translate(250.0, 250.0);
+ child_transform.Rotate(90.0);
+ child_transform.Translate(-250.0, -250.0);
WebKit::WebFilterOperations filters;
filters.append(WebKit::WebFilterOperation::createOpacityFilter(0.5));
@@ -357,7 +357,7 @@ class LayerTreeHostOcclusionTestOcclusionOpacityFilter :
root_.get(), NULL, identity_matrix_,
gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
SetLayerPropertiesForTesting(
- child_.get(), root_.get(), childTransform,
+ child_.get(), root_.get(), child_transform,
gfx::PointF(30.f, 30.f), gfx::Size(500, 500), true);
SetLayerPropertiesForTesting(
grand_child_.get(), child_.get(), identity_matrix_,
@@ -386,10 +386,10 @@ class LayerTreeHostOcclusionTestOcclusionBlurFilter :
public LayerTreeHostOcclusionTest {
public:
virtual void SetupTree() OVERRIDE {
- gfx::Transform childTransform;
- childTransform.Translate(250.0, 250.0);
- childTransform.Rotate(90.0);
- childTransform.Translate(-250.0, -250.0);
+ gfx::Transform child_transform;
+ child_transform.Translate(250.0, 250.0);
+ child_transform.Rotate(90.0);
+ child_transform.Translate(-250.0, -250.0);
WebKit::WebFilterOperations filters;
filters.append(WebKit::WebFilterOperation::createBlurFilter(10));
@@ -401,7 +401,7 @@ class LayerTreeHostOcclusionTestOcclusionBlurFilter :
root_.get(), NULL, identity_matrix_,
gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
SetLayerPropertiesForTesting(
- child_.get(), root_.get(), childTransform,
+ child_.get(), root_.get(), child_transform,
gfx::PointF(30.f, 30.f), gfx::Size(500, 500), true);
SetLayerPropertiesForTesting(
grand_child_.get(), child_.get(), identity_matrix_,
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index dae8ae8..14b225f 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -566,7 +566,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
EXPECT_VECTOR_EQ(root->sent_scroll_delta(), gfx::Vector2d());
PostSetNeedsCommitToMainThread();
- // commitCompleteOnThread will trigger this function again
+ // CommitCompleteOnThread will trigger this function again
// and cause us to take the else clause.
} else {
can_activate_ = true;
@@ -660,6 +660,5 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestScrollZeroMaxScrollOffset)
-
} // namespace
} // namespace cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 95d2291..10f5ad6 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -278,7 +278,7 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
needs_update_draw_properties_ = false;
render_surface_layer_list_.clear();
- // For maxTextureSize.
+ // For max_texture_size.
if (!layer_tree_host_impl_->renderer())
return;
@@ -371,10 +371,10 @@ void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) {
layer_id_map_.erase(layer->id());
}
-void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pendingTree) {
+void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pending_tree) {
int id = currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0;
- pendingTree->SetCurrentlyScrollingLayer(
- LayerTreeHostCommon::FindLayerInSubtree(pendingTree->root_layer(), id));
+ pending_tree->SetCurrentlyScrollingLayer(
+ LayerTreeHostCommon::FindLayerInSubtree(pending_tree->root_layer(), id));
}
static void DidBecomeActiveRecursive(LayerImpl* layer) {
@@ -430,7 +430,7 @@ const LayerTreeSettings& LayerTreeImpl::settings() const {
return layer_tree_host_impl_->settings();
}
-const RendererCapabilities& LayerTreeImpl::rendererCapabilities() const {
+const RendererCapabilities& LayerTreeImpl::GetRendererCapabilities() const {
return layer_tree_host_impl_->GetRendererCapabilities();
}
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 0a78add..1f89d16 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -42,8 +42,8 @@ class CC_EXPORT LayerTreeImpl {
public:
typedef std::vector<LayerImpl*> LayerList;
- static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_impl)
- {
+ static scoped_ptr<LayerTreeImpl> create(
+ LayerTreeHostImpl* layer_tree_host_impl) {
return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl));
}
virtual ~LayerTreeImpl();
@@ -51,7 +51,7 @@ class CC_EXPORT LayerTreeImpl {
// Methods called by the layer tree that pass-through or access LTHI.
// ---------------------------------------------------------------------------
const LayerTreeSettings& settings() const;
- const RendererCapabilities& rendererCapabilities() const;
+ const RendererCapabilities& GetRendererCapabilities() const;
OutputSurface* output_surface() const;
ResourceProvider* resource_provider() const;
TileManager* tile_manager() const;
@@ -173,7 +173,7 @@ class CC_EXPORT LayerTreeImpl {
AnimationRegistrar* animationRegistrar() const;
- void PushPersistedState(LayerTreeImpl* pendingTree);
+ void PushPersistedState(LayerTreeImpl* pending_tree);
void DidBecomeActive();
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index d81232f9..98ad442 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -253,7 +253,7 @@ static void ReduceOcclusionBelowSurface(LayerType* contributing_layer,
contributing_layer->background_filters().getOutsets(
outset_top, outset_right, outset_bottom, outset_left);
- // The filter can move pixels from outside of the clip, so allow affectedArea
+ // The filter can move pixels from outside of the clip, so allow affected_area
// to expand outside the clip.
affected_area_in_target.Inset(
-outset_left, -outset_top, -outset_right, -outset_bottom);
@@ -426,12 +426,12 @@ void OcclusionTrackerBase<LayerType, RenderSurfaceType>::
ScreenSpaceClipRectInTargetSurface(
layer->render_target()->render_surface(), screen_space_clip_rect_));
- for (Region::Iterator opaqueContentRects(opaque_contents);
- opaqueContentRects.has_rect();
- opaqueContentRects.next()) {
+ for (Region::Iterator opaque_content_rects(opaque_contents);
+ opaque_content_rects.has_rect();
+ opaque_content_rects.next()) {
gfx::QuadF transformed_quad = MathUtil::MapQuad(
layer->draw_transform(),
- gfx::QuadF(opaqueContentRects.rect()),
+ gfx::QuadF(opaque_content_rects.rect()),
&clipped);
gfx::Rect transformed_rect =
gfx::ToEnclosedRect(transformed_quad.BoundingBox());
@@ -461,14 +461,14 @@ void OcclusionTrackerBase<LayerType, RenderSurfaceType>::
Region non_opaque_contents =
SubtractRegions(gfx::Rect(layer->content_bounds()), opaque_contents);
- for (Region::Iterator nonOpaqueContentRects(non_opaque_contents);
- nonOpaqueContentRects.has_rect();
- nonOpaqueContentRects.next()) {
- // We've already checked for clipping in the mapQuad call above, these calls
+ for (Region::Iterator non_opaque_content_rects(non_opaque_contents);
+ non_opaque_content_rects.has_rect();
+ non_opaque_content_rects.next()) {
+ // We've already checked for clipping in the MapQuad call above, these calls
// should not clip anything further.
gfx::Rect transformed_rect = gfx::ToEnclosedRect(
MathUtil::MapClippedRect(layer->draw_transform(),
- gfx::RectF(nonOpaqueContentRects.rect())));
+ gfx::RectF(non_opaque_content_rects.rect())));
transformed_rect.Intersect(clip_rect_in_target);
if (transformed_rect.IsEmpty())
continue;
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 6972313..f69e4b3 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -106,7 +106,7 @@ class TestOcclusionTrackerWithClip :
has_occlusion_from_outside_target_surface);
}
// Gives an unoccluded sub-rect of |content_rect| in the content space of the
- // layer. Simple wrapper around unoccludedContentRect.
+ // layer. Simple wrapper around UnoccludedContentRect.
gfx::Rect UnoccludedLayerContentRect(const LayerType* layer,
gfx::Rect content_rect) const {
bool temp;
@@ -3570,7 +3570,7 @@ class OcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter :
// These layers occlude pixels directly beside the filtered_surface. Because
// filtered surface blends pixels in a radius, it will need to see some of
- // the pixels (up to radius far) underneath the occludingLayers.
+ // the pixels (up to radius far) underneath the occluding layers.
this->VisitLayer(occluding_layer5, occlusion);
this->VisitLayer(occluding_layer4, occlusion);
this->VisitLayer(occluding_layer3, occlusion);
@@ -3859,7 +3859,7 @@ class OcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip :
// These layers occlude pixels directly beside the filtered_surface. Because
// filtered surface blends pixels in a radius, it will need to see some of
- // the pixels (up to radius far) underneath the occludingLayers.
+ // the pixels (up to radius far) underneath the occluding layers.
this->VisitLayer(occluding_layer5, occlusion);
this->VisitLayer(occluding_layer4, occlusion);
this->VisitLayer(occluding_layer3, occlusion);
@@ -4262,7 +4262,7 @@ class
// The filter in the surface and replica are partially unoccluded. Only the
// unoccluded parts should reduce occlusion. This means it will push back
- // the occlusion that touches the unoccluded part (occlusionAbove___), but
+ // the occlusion that touches the unoccluded part (occlusion_above___), but
// it will not touch occlusion_beside____ since that is not beside the
// unoccluded part of the surface, even though it is beside the occluded
// part of the surface.
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index f0fece4..0df7f0a 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -84,7 +84,7 @@ class CC_EXPORT Proxy {
virtual void SetNeedsRedraw() = 0;
// Defers commits until it is reset. It is only supported when in threaded
- // mode. It's an error to make a sync call like compositeAndReadback while
+ // mode. It's an error to make a sync call like CompositeAndReadback while
// commits are deferred.
virtual void SetDeferCommits(bool defer_commits) = 0;
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index da2046a..d2df4ff 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -52,7 +52,7 @@ SingleThreadProxy::~SingleThreadProxy() {
}
bool SingleThreadProxy::CompositeAndReadback(void* pixels, gfx::Rect rect) {
- TRACE_EVENT0("cc", "SingleThreadProxy::compositeAndReadback");
+ TRACE_EVENT0("cc", "SingleThreadProxy::CompositeAndReadback");
DCHECK(Proxy::IsMainThread());
if (!CommitAndComposite(base::TimeTicks::Now()))
@@ -95,11 +95,11 @@ bool SingleThreadProxy::IsStarted() const {
bool SingleThreadProxy::InitializeOutputSurface() {
DCHECK(Proxy::IsMainThread());
- scoped_ptr<OutputSurface> outputSurface =
+ scoped_ptr<OutputSurface> output_surface =
layer_tree_host_->CreateOutputSurface();
- if (!outputSurface.get())
+ if (!output_surface.get())
return false;
- output_surface_before_initialization_ = outputSurface.Pass();
+ output_surface_before_initialization_ = output_surface.Pass();
return true;
}
@@ -131,13 +131,13 @@ bool SingleThreadProxy::InitializeRenderer() {
}
bool SingleThreadProxy::RecreateOutputSurface() {
- TRACE_EVENT0("cc", "SingleThreadProxy::recreateContext");
+ TRACE_EVENT0("cc", "SingleThreadProxy::RecreateContext");
DCHECK(Proxy::IsMainThread());
DCHECK(output_surface_lost_);
- scoped_ptr<OutputSurface> outputSurface =
+ scoped_ptr<OutputSurface> output_surface =
layer_tree_host_->CreateOutputSurface();
- if (!outputSurface.get())
+ if (!output_surface.get())
return false;
scoped_refptr<cc::ContextProvider> offscreen_context_provider;
if (created_offscreen_context_provider_) {
@@ -154,7 +154,7 @@ bool SingleThreadProxy::RecreateOutputSurface() {
layer_tree_host_->DeleteContentsTexturesOnImplThread(
layer_tree_host_impl_->resource_provider());
initialized =
- layer_tree_host_impl_->InitializeRenderer(outputSurface.Pass());
+ layer_tree_host_impl_->InitializeRenderer(output_surface.Pass());
if (initialized) {
renderer_capabilities_for_main_thread_ =
layer_tree_host_impl_->GetRendererCapabilities();
@@ -191,7 +191,7 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
RenderingStatsInstrumentation* stats_instrumentation =
layer_tree_host_->rendering_stats_instrumentation();
- base::TimeTicks startTime = stats_instrumentation->StartRecording();
+ base::TimeTicks start_time = stats_instrumentation->StartRecording();
layer_tree_host_impl_->BeginCommit();
@@ -199,13 +199,13 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
PushTexturePrioritiesToBackings();
layer_tree_host_->BeginCommitOnImplThread(layer_tree_host_impl_.get());
- scoped_ptr<ResourceUpdateController> updateController =
+ scoped_ptr<ResourceUpdateController> update_controller =
ResourceUpdateController::Create(
NULL,
Proxy::MainThread(),
queue.Pass(),
layer_tree_host_impl_->resource_provider());
- updateController->Finalize();
+ update_controller->Finalize();
layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get());
@@ -214,12 +214,12 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
#ifndef NDEBUG
// In the single-threaded case, the scroll deltas should never be
// touched on the impl layer tree.
- scoped_ptr<ScrollAndScaleSet> scrollInfo =
+ scoped_ptr<ScrollAndScaleSet> scroll_info =
layer_tree_host_impl_->ProcessScrollDeltas();
- DCHECK(!scrollInfo->scrolls.size());
+ DCHECK(!scroll_info->scrolls.size());
#endif
- base::TimeDelta duration = stats_instrumentation->EndRecording(startTime);
+ base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
stats_instrumentation->AddCommit(duration);
}
layer_tree_host_->CommitComplete();
@@ -233,7 +233,7 @@ void SingleThreadProxy::SetNeedsCommit() {
void SingleThreadProxy::SetNeedsRedraw() {
// FIXME: Once we move render_widget scheduling into this class, we can
- // treat redraw requests more efficiently than commitAndRedraw requests.
+ // treat redraw requests more efficiently than CommitAndRedraw requests.
layer_tree_host_impl_->SetFullRootLayerDamage();
SetNeedsCommit();
}
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index ba621e2..264c11f 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -32,14 +32,14 @@ const double kSmoothnessTakesPriorityExpirationDelay = 0.25;
namespace cc {
scoped_ptr<Proxy> ThreadProxy::Create(LayerTreeHost* layer_tree_host,
- scoped_ptr<Thread> implThread) {
+ scoped_ptr<Thread> impl_thread) {
return make_scoped_ptr(
- new ThreadProxy(layer_tree_host, implThread.Pass())).PassAs<Proxy>();
+ new ThreadProxy(layer_tree_host, impl_thread.Pass())).PassAs<Proxy>();
}
ThreadProxy::ThreadProxy(LayerTreeHost* layer_tree_host,
- scoped_ptr<Thread> implThread)
- : Proxy(implThread.Pass()),
+ scoped_ptr<Thread> impl_thread)
+ : Proxy(impl_thread.Pass()),
animate_requested_(false),
commit_requested_(false),
commit_request_sent_to_impl_thread_(false),
@@ -216,7 +216,7 @@ void ThreadProxy::SetVisibleOnImplThread(CompletionEvent* completion,
bool ThreadProxy::InitializeRenderer() {
TRACE_EVENT0("cc", "ThreadProxy::InitializeRenderer");
- // Make a blocking call to initializeRendererOnImplThread. The results of that
+ // Make a blocking call to InitializeRendererOnImplThread. The results of that
// call are pushed into the initialize_succeeded and capabilities local
// variables.
CompletionEvent completion;
@@ -255,7 +255,7 @@ bool ThreadProxy::RecreateOutputSurface() {
return false;
}
- // Make a blocking call to recreateOutputSurfaceOnImplThread. The results of
+ // Make a blocking call to RecreateOutputSurfaceOnImplThread. The results of
// that call are pushed into the recreate_succeeded and capabilities local
// variables.
CompletionEvent completion;
@@ -445,7 +445,7 @@ void ThreadProxy::SendManagedMemoryStats() {
if (!layer_tree_host_->contents_texture_manager())
return;
- // If we are using impl-side painting, then sendManagedMemoryStats is called
+ // If we are using impl-side painting, then SendManagedMemoryStats is called
// directly after the tile manager's manage function, and doesn't need to
// interact with main thread's layer tree.
if (layer_tree_host_->settings().impl_side_painting)
@@ -493,7 +493,7 @@ bool ThreadProxy::CommitRequested() const {
void ThreadProxy::SetNeedsRedrawOnImplThread() {
DCHECK(IsImplThread());
- TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread");
+ TRACE_EVENT0("cc", "ThreadProxy::SetNeedsRedrawOnImplThread");
scheduler_on_impl_thread_->SetNeedsRedraw();
}
@@ -630,14 +630,14 @@ void ThreadProxy::BeginFrame(
}
// Do not notify the impl thread of commit requests that occur during
- // the apply/animate/layout part of the beginFrameAndCommit process since
+ // the apply/animate/layout part of the BeginFrameAndCommit process since
// those commit requests will get painted immediately. Once we have done
// the paint, commit_requested_ will be set to false to allow new commit
// requests to be scheduled.
commit_requested_ = true;
commit_request_sent_to_impl_thread_ = true;
- // On the other hand, the animationRequested flag needs to be cleared
+ // On the other hand, the AnimationRequested flag needs to be cleared
// here so that any animation requests generated by the apply or animate
// callbacks will trigger another frame.
animate_requested_ = false;
@@ -665,7 +665,7 @@ void ThreadProxy::BeginFrame(
}
// Unlink any backings that the impl thread has evicted, so that we know to
- // re-paint them in updateLayers.
+ // re-paint them in UpdateLayers.
if (layer_tree_host_->contents_texture_manager()) {
layer_tree_host_->contents_texture_manager()->
UnlinkAndClearEvictedBackings();
@@ -674,8 +674,8 @@ void ThreadProxy::BeginFrame(
layer_tree_host_->Layout();
// Clear the commit flag after updating animations and layout here --- objects
- // that only layout when painted will trigger another setNeedsCommit inside
- // updateLayers.
+ // that only layout when painted will trigger another SetNeedsCommit inside
+ // UpdateLayers.
commit_requested_ = false;
commit_request_sent_to_impl_thread_ = false;
@@ -697,12 +697,12 @@ void ThreadProxy::BeginFrame(
layer_tree_host_->WillCommit();
// Before applying scrolls and calling animate, we set animate_requested_ to
- // false. If it is true now, it means setNeedAnimate was called again, but
+ // false. If it is true now, it means SetNeedAnimate was called again, but
// during a state when commit_request_sent_to_impl_thread_ = true. We need to
// force that call to happen again now so that the commit request is sent to
// the impl thread.
if (animate_requested_) {
- // Forces setNeedsAnimate to consider posting a commit task.
+ // Forces SetNeedsAnimate to consider posting a commit task.
animate_requested_ = false;
SetNeedsAnimate();
}
@@ -716,7 +716,7 @@ void ThreadProxy::BeginFrame(
created_offscreen_context_provider_ = true;
}
- // Notify the impl thread that the beginFrame has completed. This will
+ // Notify the impl thread that the BeginFrame has completed. This will
// begin the commit process, which is blocking from the main thread's
// point of view, but asynchronously performed on the impl thread,
// coordinated by the Scheduler.
@@ -916,7 +916,7 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) {
completion_event_for_commit_held_on_tree_activation_ = NULL;
}
- // Check for a pending compositeAndReadback.
+ // Check for a pending CompositeAndReadback.
if (readback_request_on_impl_thread_) {
readback_request_on_impl_thread_->success = false;
if (draw_frame) {
@@ -1060,14 +1060,14 @@ void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion,
TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
DCHECK(IsImplThread());
layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
- const base::TimeDelta displayRefreshInterval =
+ const base::TimeDelta display_refresh_interval =
base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
60);
scoped_ptr<FrameRateController> frame_rate_controller;
if (render_vsync_enabled_) {
frame_rate_controller.reset(
new FrameRateController(DelayBasedTimeSource::Create(
- displayRefreshInterval, Proxy::ImplThread())));
+ display_refresh_interval, Proxy::ImplThread())));
} else {
frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread()));
}
@@ -1108,14 +1108,14 @@ void ThreadProxy::InitializeRendererOnImplThread(
scheduler_on_impl_thread_->SetSwapBuffersCompleteSupported(
capabilities->using_swap_complete_callback);
- int maxFramesPending = layer_tree_host_impl_->output_surface()->
+ int max_frames_pending = layer_tree_host_impl_->output_surface()->
capabilities().max_frames_pending;
- if (maxFramesPending <= 0)
- maxFramesPending = FrameRateController::DEFAULT_MAX_FRAMES_PENDING;
+ if (max_frames_pending <= 0)
+ max_frames_pending = FrameRateController::DEFAULT_MAX_FRAMES_PENDING;
if (layer_tree_host_impl_->output_surface()->capabilities().
has_parent_compositor)
- maxFramesPending = 1;
- scheduler_on_impl_thread_->SetMaxFramesPending(maxFramesPending);
+ max_frames_pending = 1;
+ scheduler_on_impl_thread_->SetMaxFramesPending(max_frames_pending);
}
completion->Signal();
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 5a235e3..67084a6 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -224,7 +224,7 @@ class ThreadProxy : public Proxy,
scoped_ptr<OutputSurface>
output_surface_before_initialization_on_impl_thread_;
- // Set when the main thread is waiting on a scheduledActionBeginFrame to be
+ // Set when the main thread is waiting on a ScheduledActionBeginFrame to be
// issued.
CompletionEvent* begin_frame_completion_event_on_impl_thread_;
@@ -243,7 +243,7 @@ class ThreadProxy : public Proxy,
scoped_ptr<ResourceUpdateController>
current_resource_update_controller_on_impl_thread_;
- // Set when the next draw should post didCommitAndDrawFrame to the main
+ // Set when the next draw should post DidCommitAndDrawFrame to the main
// thread.
bool next_frame_is_newly_committed_frame_on_impl_thread_;
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 5bbfca6..130d404 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -148,7 +148,7 @@ void UpdateScrollbarLayerPointersRecursiveInternal(
}
ScrollbarLayerType* scrollbar_layer = layer->ToScrollbarLayer();
- // Pinch-zoom scrollbars will have an invalid scrollLayerId, but they are
+ // Pinch-zoom scrollbars will have an invalid scroll_layer_id, but they are
// managed by LayerTreeImpl and not LayerImpl, so should not be
// processed here.
if (!scrollbar_layer || (scrollbar_layer->scroll_layer_id() ==