deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/111353003
git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 2d96eff..010fc25 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -306,8 +306,8 @@
win->attach(fBackend, fMSAASampleCount, &attachmentInfo);
GrBackendRenderTargetDesc desc;
- desc.fWidth = SkScalarRound(win->width());
- desc.fHeight = SkScalarRound(win->height());
+ desc.fWidth = SkScalarRoundToInt(win->width());
+ desc.fHeight = SkScalarRoundToInt(win->height());
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
desc.fSampleCnt = attachmentInfo.fSampleCount;
@@ -1314,8 +1314,8 @@
int count = canvas->save();
canvas->resetMatrix();
// Ensure the mouse position is on screen.
- int width = SkScalarRound(this->width());
- int height = SkScalarRound(this->height());
+ int width = SkScalarRoundToInt(this->width());
+ int height = SkScalarRoundToInt(this->height());
if (fMouseX >= width) fMouseX = width - 1;
else if (fMouseX < 0) fMouseX = 0;
if (fMouseY >= height) fMouseY = height - 1;
@@ -2039,8 +2039,8 @@
if (Click::kMoved_State == state) {
updatePointer(x, y);
}
- int w = SkScalarRound(this->width());
- int h = SkScalarRound(this->height());
+ int w = SkScalarRoundToInt(this->width());
+ int h = SkScalarRoundToInt(this->height());
// check for the resize-box
if (w - x < 16 && h - y < 16) {