OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SampleCode_DEFINED | 10 #ifndef SampleCode_DEFINED |
(...skipping 21 matching lines...) Expand all Loading... |
32 static bool FastTextQ(const SkEvent&); | 32 static bool FastTextQ(const SkEvent&); |
33 | 33 |
34 static SkMSec GetAnimTime(); | 34 static SkMSec GetAnimTime(); |
35 static SkMSec GetAnimTimeDelta(); | 35 static SkMSec GetAnimTimeDelta(); |
36 static SkScalar GetAnimSecondsDelta(); | 36 static SkScalar GetAnimSecondsDelta(); |
37 static SkScalar GetAnimScalar(SkScalar speedPerSec, SkScalar period = 0); | 37 static SkScalar GetAnimScalar(SkScalar speedPerSec, SkScalar period = 0); |
38 // gives a sinusoidal value between 0 and amplitude | 38 // gives a sinusoidal value between 0 and amplitude |
39 static SkScalar GetAnimSinScalar(SkScalar amplitude, | 39 static SkScalar GetAnimSinScalar(SkScalar amplitude, |
40 SkScalar periodInSec, | 40 SkScalar periodInSec, |
41 SkScalar phaseInSec = 0); | 41 SkScalar phaseInSec = 0); |
42 | |
43 static GrContext* GetGr(); | |
44 }; | 42 }; |
45 | 43 |
46 ////////////////////////////////////////////////////////////////////////////// | 44 ////////////////////////////////////////////////////////////////////////////// |
47 | 45 |
48 // interface that constructs SkViews | 46 // interface that constructs SkViews |
49 class SkViewFactory : public SkRefCnt { | 47 class SkViewFactory : public SkRefCnt { |
50 public: | 48 public: |
51 virtual SkView* operator() () const = 0; | 49 virtual SkView* operator() () const = 0; |
52 }; | 50 }; |
53 | 51 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 private: | 145 private: |
148 int fRepeatCount; | 146 int fRepeatCount; |
149 | 147 |
150 bool fDebugHitTest; | 148 bool fDebugHitTest; |
151 SkIPoint fDebugHitTestLoc; | 149 SkIPoint fDebugHitTestLoc; |
152 | 150 |
153 typedef SkView INHERITED; | 151 typedef SkView INHERITED; |
154 }; | 152 }; |
155 | 153 |
156 #endif | 154 #endif |
OLD | NEW |