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

Unified Diff: cc/content_layer_updater.cc

Issue 11293084: cc: Get rid of FloatToSkScalar() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc.gyp ('k') | cc/stubs/SkiaUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/content_layer_updater.cc
diff --git a/cc/content_layer_updater.cc b/cc/content_layer_updater.cc
index 8888e0da86da56496d1542a1e7097673c3403939..5ad5f85f5a0818992493b2bcbdbbd98d55a6dff0 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);
« no previous file with comments | « cc/cc.gyp ('k') | cc/stubs/SkiaUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698