commit | 41a90fe7f9343cd653b91e63e7bffbe51920fc9f | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Mon Jan 28 14:28:10 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jan 28 14:28:10 2019 |
tree | 49a6d603e68ef347d4f59d315e95f0a2309cbf85 | |
parent | a9422f3412a4b3375d2b697b05cdefec03cfa970 [diff] |
Fix gfx related shadowing warnings in blink/platform A long term plan is to support -Wshadow in the code, which both might avoid coding mistakes and reduce the risk of jumbo-specific build problems. This fixes about half the shadowing problems in blink/platform, the half that is related to gfx. Bug: 925310 Explicit warnings this patch fixes: third_party/blink/renderer/platform/geometry/region.cc:45:33: error: declaration shadows a local variable [-Werror,-Wshadow] end = shape_.SegmentsEnd(span); third_party/blink/renderer/platform/geometry/region.cc:39:56: note: previous declaration is here for (Shape::SpanIterator span = shape_.SpansBegin(), end = shape_.SpansEnd(); ^ third_party/blink/renderer/platform/geometry/region.cc:80:33: error: declaration shadows a local variable [-Werror,-Wshadow] end = shape_.SegmentsEnd(span); ^ third_party/blink/renderer/platform/geometry/region.cc:69:56: note: previous declaration is here for (Shape::SpanIterator span = shape_.SpansBegin(), end = shape_.SpansEnd(); ^ third_party/blink/renderer/platform/geometry/region.cc:110:33: error: declaration shadows a local variable [-Werror,-Wshadow] end = shape_.SegmentsEnd(span); ^ third_party/blink/renderer/platform/geometry/region.cc:105:56: note: previous declaration is here for (Shape::SpanIterator span = shape_.SpansBegin(), end = shape_.SpansEnd(); ^ third_party/blink/renderer/platform/geometry/region.cc:337:33: error: declaration shadows a local variable [-Werror,-Wshadow] end = SegmentsEnd(span); ^ third_party/blink/renderer/platform/geometry/region.cc:332:49: note: previous declaration is here for (Shape::SpanIterator span = SpansBegin(), end = SpansEnd(); span != end; ^ third_party/blink/renderer/platform/geometry/region.cc:465:11: error: declaration shadows a local variable [-Werror,-Wshadow] int test = *s1 - *s2; ^ third_party/blink/renderer/platform/geometry/region.cc:435:9: note: previous declaration is here int test = spans1->y - spans2->y; ^ third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc:144:7: error: declaration shadows a variable in namespace 'blink::(anonymous)' [-Werror,-Wshadow] int next_async_mutation_id = GetNextAsyncMutationId(); ^ third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc:24:5: note: previous declaration is here int next_async_mutation_id = 0; ^ third_party/blink/renderer/platform/graphics/compositing/content_layer_client_impl.cc:72:10: error: declaration shadows a local variable [-Werror,-Wshadow] auto it = context.rendering_context_map.find(rendering_context); ^ third_party/blink/renderer/platform/graphics/compositing/content_layer_client_impl.cc:44:8: note: previous declaration is here auto it = context.transform_id_map.find(transform); ^ third_party/blink/renderer/platform/transforms/interpolated_transform_operation.cc:59:31: error: declaration shadows a field of 'blink::InterpolatedTransformOperation' [-Werror,-Wshadow] const TransformOperation* from, ^ third_party/blink/renderer/platform/transforms/interpolated_transform_operation.h:84:29: note: previous declaration is here const TransformOperations from; ^ third_party/blink/renderer/platform/transforms/interpolated_transform_operation.cc:60:12: error: declaration shadows a field of 'blink::InterpolatedTransformOperation' [-Werror,-Wshadow] double progress, ^ ../../third_party/blink/renderer/platform/transforms/interpolated_transform_operation.h:90:10: note: previous declaration is here double progress; ^ third_party/blink/renderer/platform/transforms/transform_operations.cc:246:20: error: declaration shadows a local variable [-Werror,-Wshadow] FloatPoint3D to_point = point - origin; ^ third_party/blink/renderer/platform/transforms/transform_operations.cc:218:16: note: previous declaration is here FloatPoint3D to_point = to_matrix.MapPoint(point); ^ third_party/blink/renderer/platform/transforms/transform_operations.cc:418:21: error: declaration shadows a local variable [-Werror,-Wshadow] for (size_t i = 0; i < 2; ++i) { ^ third_party/blink/renderer/platform/transforms/transform_operations.cc:312:12: note: previous declaration is here for (int i = size - 1; i >= 0; i--) { ^ third_party/blink/renderer/platform/transforms/interpolated_transform_operation.cc:60:12: error: declaration shadows a field of 'blink::InterpolatedTransformOperation' [-Werror,-Wshadow] double progress, ^ ../../third_party/blink/renderer/platform/transforms/interpolated_transform_operation.h:90:10: note: previous declaration is here double progress; ^ third_party/blink/renderer/platform/transforms/interpolated_transform_operation.cc:60:12: error: declaration shadows a field of 'blink::InterpolatedTransformOperation' [-Werror,-Wshadow] double progress, ^ ../../third_party/blink/renderer/platform/transforms/interpolated_transform_operation.h:90:10: note: previous declaration is here double progress; Change-Id: I57a663a9492d729d95fca02e2fa8027c235ad2f8 Reviewed-on: https://chromium-review.googlesource.com/c/1436365 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#626529}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .