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

Unified Diff: samplecode/SampleApp.cpp

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | « samplecode/SampleAll.cpp ('k') | samplecode/SampleCull.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 2d96eff8d83a6e857a515dd549cf744617e2cdeb..010fc2553c6d58325607640db5f43ce757a6f0cd 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -306,8 +306,8 @@ public:
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 @@ void SampleWindow::showZoomer(SkCanvas* canvas) {
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 @@ bool SampleWindow::onDispatchClick(int x, int y, Click::State state,
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) {
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleCull.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698