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

Unified Diff: samplecode/SampleChart.cpp

Issue 23498028: Removes uses of unnamed namespace from samplecode. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add static Created 7 years, 3 months 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/OverView.cpp ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleChart.cpp
diff --git a/samplecode/SampleChart.cpp b/samplecode/SampleChart.cpp
index 35f8206f76f2bd815a512db8a802428ff6033349..630ff6edc30b2850131c1a86b99550b330490476 100644
--- a/samplecode/SampleChart.cpp
+++ b/samplecode/SampleChart.cpp
@@ -1,20 +1,18 @@
-
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "SampleCode.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkView.h"
-namespace {
-
// Generates y values for the chart plots.
-void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* dataPts) {
+static void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* dataPts) {
dataPts->setCount(count);
static SkRandom gRandom;
for (int i = 0; i < count; ++i) {
@@ -27,12 +25,12 @@ void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* d
// plot. The fill path is bounded below by the bottomData plot points or a horizontal line at
// yBase if bottomData == NULL.
// The plots are animated by rotating the data points by leftShift.
-void gen_paths(const SkTDArray<SkScalar>& topData,
- const SkTDArray<SkScalar>* bottomData,
- SkScalar yBase,
- SkScalar xLeft, SkScalar xDelta,
- int leftShift,
- SkPath* plot, SkPath* fill) {
+static void gen_paths(const SkTDArray<SkScalar>& topData,
+ const SkTDArray<SkScalar>* bottomData,
+ SkScalar yBase,
+ SkScalar xLeft, SkScalar xDelta,
+ int leftShift,
+ SkPath* plot, SkPath* fill) {
plot->rewind();
fill->rewind();
plot->incReserve(topData.count());
@@ -80,8 +78,6 @@ void gen_paths(const SkTDArray<SkScalar>& topData,
}
}
-}
-
// A set of scrolling line plots with the area between each plot filled. Stresses out GPU path
// filling
class ChartView : public SampleView {
« no previous file with comments | « samplecode/OverView.cpp ('k') | samplecode/SampleTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698