diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-05 01:51:39 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-05 01:51:39 +0000 |
commit | de6b07ebe55062c249328533e610a8620691d4fc (patch) | |
tree | 87d85ea0b8287ec72d07362f67411ce6d87a5c9d /cc/content_layer_updater.cc | |
parent | a2cdfe8a194500e76171a0ef2e8ab6257dccfb51 (diff) | |
download | chromium_src-de6b07ebe55062c249328533e610a8620691d4fc.zip chromium_src-de6b07ebe55062c249328533e610a8620691d4fc.tar.gz chromium_src-de6b07ebe55062c249328533e610a8620691d4fc.tar.bz2 |
cc: Get rid of FloatToSkScalar() function.
Accordding to Dana:
"We can probably just call SkFloatToScalar directly in those sites.
Those values should never be NaN or infinity."
BUG=147395
TEST=cc_unittests
R=enne@chromium.org,danakj@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11293084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/content_layer_updater.cc')
-rw-r--r-- | cc/content_layer_updater.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/content_layer_updater.cc b/cc/content_layer_updater.cc index 8888e0d..5ad5f85 100644 --- a/cc/content_layer_updater.cc +++ b/cc/content_layer_updater.cc @@ -6,7 +6,6 @@ #include "cc/content_layer_updater.h" -#include "SkiaUtils.h" #include "base/debug/trace_event.h" #include "base/time.h" #include "cc/layer_painter.h" @@ -14,6 +13,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkRect.h" +#include "third_party/skia/include/core/SkScalar.h" #include "ui/gfx/rect_conversions.h" #include "ui/gfx/rect_f.h" @@ -32,12 +32,12 @@ void ContentLayerUpdater::paintContents(SkCanvas* canvas, const gfx::Rect& conte { TRACE_EVENT0("cc", "ContentLayerUpdater::paintContents"); canvas->save(); - canvas->translate(FloatToSkScalar(-contentRect.x()), FloatToSkScalar(-contentRect.y())); + canvas->translate(SkFloatToScalar(-contentRect.x()), SkFloatToScalar(-contentRect.y())); gfx::Rect layerRect = contentRect; if (contentsWidthScale != 1 || contentsHeightScale != 1) { - canvas->scale(FloatToSkScalar(contentsWidthScale), FloatToSkScalar(contentsHeightScale)); + canvas->scale(SkFloatToScalar(contentsWidthScale), SkFloatToScalar(contentsHeightScale)); gfx::RectF rect = gfx::ScaleRect(contentRect, 1 / contentsWidthScale, 1 / contentsHeightScale); layerRect = gfx::ToEnclosingRect(rect); |