diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 17:30:55 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 17:30:55 +0000 |
commit | 8a82269dafa5aca936588a6d9a7b74acfc8565c9 (patch) | |
tree | b9bec591201c984a051cf95e1754985b70ee3802 /cc/debug | |
parent | f734b224073190d8a32986c6550b7e5492e92735 (diff) | |
download | chromium_src-8a82269dafa5aca936588a6d9a7b74acfc8565c9.zip chromium_src-8a82269dafa5aca936588a6d9a7b74acfc8565c9.tar.gz chromium_src-8a82269dafa5aca936588a6d9a7b74acfc8565c9.tar.bz2 |
Avoid int->float->int conversion in OcclusionTracker for int translates.
If the transform on a layer is an integer translation, we can easily
avoid converting the query rectangle to floats just to convert them
back to integers again. This is super costly.
Added a perftest for this. On an N4 the results are
Before: 20.553817749023438 us
After: 13.440165519714355 us
For about 35% reduction in time in this scnario.
Also renames MapClippedRect(Rect) to MapEnclosingClippedRect(Rect) to
describe what it does better, and audit callsides of MapClippedRect
to change any others that then ToEnclosingRect to call the
MapEnclosingClippedRect instead. Similar for Project.
R=enne
BUG=342848
Review URL: https://codereview.chromium.org/143293005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug')
-rw-r--r-- | cc/debug/debug_rect_history.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc index c361603..2f01f4a 100644 --- a/cc/debug/debug_rect_history.cc +++ b/cc/debug/debug_rect_history.cc @@ -112,9 +112,9 @@ void DebugRectHistory::SavePropertyChangedRects( if (layer->LayerPropertyChanged()) { debug_rects_.push_back( DebugRect(PROPERTY_CHANGED_RECT_TYPE, - MathUtil::MapClippedRect( + MathUtil::MapEnclosingClippedRect( layer->screen_space_transform(), - gfx::RectF(gfx::PointF(), layer->content_bounds())))); + gfx::Rect(layer->content_bounds())))); } } } |