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

Side by Side Diff: skia/animator/SkOperandInterpolator.h

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « skia/animator/SkOperand2.h ('k') | skia/animator/SkOperandIterpolator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* libs/graphics/animator/SkOperandInterpolator.h
2 **
3 ** Copyright 2006, The Android Open Source Project
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18 #ifndef SkOperandInterpolator_DEFINED
19 #define SkOperandInterpolator_DEFINED
20
21 #include "SkDisplayType.h"
22 #include "SkInterpolator.h"
23 #include "SkOperand.h"
24
25 class SkOperandInterpolator : public SkInterpolatorBase {
26 public:
27 SkOperandInterpolator();
28 SkOperandInterpolator(int elemCount, int frameCount, SkDisplayTypes type);
29 SkOperand* getValues() { return fValues; }
30 int getValuesCount() { return fFrameCount * fElemCount; }
31 void reset(int elemCount, int frameCount, SkDisplayTypes type);
32
33 /** Add or replace a key frame, copying the values[] data into the interpola tor.
34 @param index The index of this frame (frames must be ordered by time)
35 @param time The millisecond time for this frame
36 @param values The array of values [elemCount] for this frame. The data is copied
37 into the interpolator.
38 @param blend A positive scalar specifying how to blend between this a nd the next key frame.
39 [0...1) is a cubic lag/log/lag blend (slow to change at the beginning and end)
40 1 is a linear blend (default)
41 (1...inf) is a cubic log/lag/log blend (fast to change a t the beginning and end)
42 */
43 bool setKeyFrame(int index, SkMSec time, const SkOperand values[], SkScal ar blend = SK_Scalar1);
44 Result timeToValues(SkMSec time, SkOperand values[]) const;
45 SkDEBUGCODE(static void UnitTest();)
46 private:
47 SkDisplayTypes fType;
48 SkOperand* fValues; // pointer into fStorage
49 #ifdef SK_DEBUG
50 SkOperand(* fValuesArray)[10];
51 #endif
52 typedef SkInterpolatorBase INHERITED;
53 };
54
55 #endif // SkOperandInterpolator_DEFINED
56
OLDNEW
« no previous file with comments | « skia/animator/SkOperand2.h ('k') | skia/animator/SkOperandIterpolator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698