diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 03:29:29 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 03:29:29 +0000 |
commit | ed511b8dbf23c216aa87e11e9d49c1e69d82de60 (patch) | |
tree | ff1bdc0c8c74a0357c07847d4f3e9f32190930df /cc/output | |
parent | 69fc57001ee3a1496830488254710865bc8f52b3 (diff) | |
download | chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.zip chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.tar.gz chromium_src-ed511b8dbf23c216aa87e11e9d49c1e69d82de60.tar.bz2 |
cc: Fix capitalization style in chromified files.
Style-only change.
Many already-chromified files missed a variable or function name
here and there. This grabs (hopefully) all of them.
For the record, I found these with:
git gs '[^a-zA-Z0-9_>\."][a-jl-z]\+[A-Z][A-Za-z0-9_]*\($\|[ !=;,\.^&*)"]\)'
R=enne
BUG=
Review URL: https://chromiumcodereview.appspot.com/12676029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output')
-rw-r--r-- | cc/output/delegating_renderer.cc | 40 | ||||
-rw-r--r-- | cc/output/delegating_renderer_unittest.cc | 4 | ||||
-rw-r--r-- | cc/output/direct_renderer.cc | 46 | ||||
-rw-r--r-- | cc/output/gl_renderer.cc | 20 | ||||
-rw-r--r-- | cc/output/gl_renderer.h | 2 | ||||
-rw-r--r-- | cc/output/gl_renderer_pixeltest.cc | 2 | ||||
-rw-r--r-- | cc/output/gl_renderer_unittest.cc | 48 | ||||
-rw-r--r-- | cc/output/output_surface.cc | 10 | ||||
-rw-r--r-- | cc/output/render_surface_filters.cc | 10 | ||||
-rw-r--r-- | cc/output/software_output_device.cc | 4 | ||||
-rw-r--r-- | cc/output/software_renderer.cc | 8 | ||||
-rw-r--r-- | cc/output/software_renderer_unittest.cc | 8 |
12 files changed, 102 insertions, 100 deletions
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); |