Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: cc/layers/layer_impl.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/nine_patch_layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 base::saturated_cast<int>(GPUMemoryUsageInBytes())); 1754 base::saturated_cast<int>(GPUMemoryUsageInBytes()));
1755 1755
1756 MathUtil::AddToTracedValue( 1756 MathUtil::AddToTracedValue(
1757 "scroll_offset", scroll_offset_ ? scroll_offset_->Current(IsActive()) 1757 "scroll_offset", scroll_offset_ ? scroll_offset_->Current(IsActive())
1758 : gfx::ScrollOffset(), 1758 : gfx::ScrollOffset(),
1759 state); 1759 state);
1760 1760
1761 MathUtil::AddToTracedValue("transform_origin", transform_origin_, state); 1761 MathUtil::AddToTracedValue("transform_origin", transform_origin_, state);
1762 1762
1763 bool clipped; 1763 bool clipped;
1764 gfx::QuadF layer_quad = MathUtil::MapQuad( 1764 gfx::QuadF layer_quad =
1765 screen_space_transform(), gfx::QuadF(gfx::Rect(bounds())), &clipped); 1765 MathUtil::MapQuad(screen_space_transform(),
1766 gfx::QuadF(gfx::RectF(gfx::Rect(bounds()))), &clipped);
1766 MathUtil::AddToTracedValue("layer_quad", layer_quad, state); 1767 MathUtil::AddToTracedValue("layer_quad", layer_quad, state);
1767 if (!touch_event_handler_region_.IsEmpty()) { 1768 if (!touch_event_handler_region_.IsEmpty()) {
1768 state->BeginArray("touch_event_handler_region"); 1769 state->BeginArray("touch_event_handler_region");
1769 touch_event_handler_region_.AsValueInto(state); 1770 touch_event_handler_region_.AsValueInto(state);
1770 state->EndArray(); 1771 state->EndArray();
1771 } 1772 }
1772 if (have_wheel_event_handlers_) { 1773 if (have_wheel_event_handlers_) {
1773 gfx::Rect wheel_rect(bounds()); 1774 gfx::Rect wheel_rect(bounds());
1774 Region wheel_region(wheel_rect); 1775 Region wheel_region(wheel_rect);
1775 state->BeginArray("wheel_event_handler_region"); 1776 state->BeginArray("wheel_event_handler_region");
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 } 1930 }
1930 1931
1931 // TODO(enne): the transform needs to come from property trees instead of 1932 // TODO(enne): the transform needs to come from property trees instead of
1932 // draw properties. 1933 // draw properties.
1933 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1934 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1934 draw_properties().target_space_transform, default_scale); 1935 draw_properties().target_space_transform, default_scale);
1935 return std::max(transform_scales.x(), transform_scales.y()); 1936 return std::max(transform_scales.x(), transform_scales.y());
1936 } 1937 }
1937 1938
1938 } // namespace cc 1939 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/nine_patch_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698