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

Side by Side Diff: samplecode/OverView.cpp

Issue 23498028: Removes uses of unnamed namespace from samplecode. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | samplecode/SampleChart.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "OverView.h" 8 #include "OverView.h"
9 9
10 #include "SampleCode.h" 10 #include "SampleCode.h"
11 11
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkView.h" 13 #include "SkView.h"
14 14
15 namespace {
16
17 const int N = 8; 15 const int N = 8;
tfarina 2013/09/10 18:14:07 AFAIK, const has internal linkage in C++.
18 const SkScalar kWidth = SkIntToScalar(640); 16 const SkScalar kWidth = SkIntToScalar(640);
19 const SkScalar kHeight = SkIntToScalar(480); 17 const SkScalar kHeight = SkIntToScalar(480);
20 const char gIsOverview[] = "is-overview"; 18 const char gIsOverview[] = "is-overview";
tfarina 2013/09/10 00:10:18 $ nm out/Debug/obj/samplecode/SampleApp.OverView.o
bsalomon 2013/09/11 20:15:27 Is that gIsOverview is treated as a ptr to a const
tfarina 2013/09/11 21:15:21 no. according to cdecl and the right-to-left synt
21 19
22 } // namespace
23
24 class OverView : public SkView { 20 class OverView : public SkView {
25 public: 21 public:
26 OverView(int count, const SkViewFactory* factories[]); 22 OverView(int count, const SkViewFactory* factories[]);
27 virtual ~OverView(); 23 virtual ~OverView();
28 24
29 protected: 25 protected:
30 // Overridden from SkEventSink: 26 // Overridden from SkEventSink:
31 virtual bool onEvent(const SkEvent&) SK_OVERRIDE; 27 virtual bool onEvent(const SkEvent&) SK_OVERRIDE;
32 virtual bool onQuery(SkEvent* evt) SK_OVERRIDE { 28 virtual bool onQuery(SkEvent* evt) SK_OVERRIDE {
33 if (SampleCode::TitleQ(*evt)) { 29 if (SampleCode::TitleQ(*evt)) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 locY += kHeight; 104 locY += kHeight;
109 locX = 0; 105 locX = 0;
110 } 106 }
111 } 107 }
112 } 108 }
113 109
114 SkCanvas* OverView::beforeChildren(SkCanvas* canvas) { 110 SkCanvas* OverView::beforeChildren(SkCanvas* canvas) {
115 canvas->scale(SK_Scalar1 / N, SK_Scalar1 / N); 111 canvas->scale(SK_Scalar1 / N, SK_Scalar1 / N);
116 return canvas; 112 return canvas;
117 } 113 }
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleChart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698