diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 10:41:53 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 10:41:53 +0000 |
commit | 1d5b954b54e147d0b5a205894c1bf3c3e4c0f205 (patch) | |
tree | 039bbc90b9ebb757201e13af22701320efe2f7f9 /cc/base/math_util.h | |
parent | f526d4dc7af3965969aeb02f328a181538c1bf4f (diff) | |
download | chromium_src-1d5b954b54e147d0b5a205894c1bf3c3e4c0f205.zip chromium_src-1d5b954b54e147d0b5a205894c1bf3c3e4c0f205.tar.gz chromium_src-1d5b954b54e147d0b5a205894c1bf3c3e4c0f205.tar.bz2 |
Don't draw invisible portions of quads in software renderer.
The software renderer should only try to draw portions of quads that are within visible_rect, which will reduce overdraw in the browser compositor.
BUG=276069
Review URL: https://chromiumcodereview.appspot.com/22815022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/base/math_util.h')
-rw-r--r-- | cc/base/math_util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cc/base/math_util.h b/cc/base/math_util.h index 37f0c07..6cf929c 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -144,6 +144,15 @@ class CC_EXPORT MathUtil { static gfx::Vector2dF ComputeTransform2dScaleComponents(const gfx::Transform&, float fallbackValue); + // Makes a rect that has the same relationship to input_outer_rect as + // scale_inner_rect has to scale_outer_rect. scale_inner_rect should be + // contained within scale_outer_rect, and likewise the rectangle that is + // returned will be within input_outer_rect at a similar relative, scaled + // position. + static gfx::RectF ScaleRectProportional(const gfx::RectF& input_outer_rect, + const gfx::RectF& scale_outer_rect, + const gfx::RectF& scale_inner_rect); + // Returns the smallest angle between the given two vectors in degrees. // Neither vector is assumed to be normalized. static float SmallestAngleBetweenVectors(gfx::Vector2dF v1, |