OLD | NEW |
1 /* | 1 <!--- |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright 2015, Google Inc. |
| 3 * All rights reserved. |
3 * | 4 * |
4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
6 * met: | 7 * met: |
7 * | 8 * |
8 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 11 * * Redistributions in binary form must reproduce the above |
11 * copyright notice, this list of conditions and the following disclaimer | 12 * copyright notice, this list of conditions and the following disclaimer |
12 * in the documentation and/or other materials provided with the | 13 * in the documentation and/or other materials provided with the |
13 * distribution. | 14 * distribution. |
14 * * Neither the name of Google Inc. nor the names of its | 15 * * Neither the name of Google Inc. nor the names of its |
15 * contributors may be used to endorse or promote products derived from | 16 * contributors may be used to endorse or promote products derived from |
16 * this software without specific prior written permission. | 17 * this software without specific prior written permission. |
17 * | 18 * |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 30 --> |
30 | 31 |
31 #ifndef AnimatableShapeValue_h | 32 # Census - a resource measurement and tracing system |
32 #define AnimatableShapeValue_h | |
33 | 33 |
34 #include "core/CoreExport.h" | 34 This directory contains code for Census, which will ultimately provide the |
35 #include "core/animation/animatable/AnimatableValue.h" | 35 following features for any gRPC-using system: |
36 #include "core/style/ShapeValue.h" | 36 * A [dapper](http://research.google.com/pubs/pub36356.html)-like tracing |
| 37 system, enabling tracing across a distributed infrastructure. |
| 38 * RPC statistics and measurements for key metrics, such as latency, bytes |
| 39 transferred, number of errors etc. |
| 40 * Resource measurement framework which can be used for measuring custom |
| 41 metrics. Through the use of [tags](#Tags), these can be broken down across |
| 42 the entire distributed stack. |
| 43 * Easy integration of the above with |
| 44 [Google Cloud Trace](https://cloud.google.com/tools/cloud-trace) and |
| 45 [Google Cloud Monitoring](https://cloud.google.com/monitoring/). |
37 | 46 |
38 namespace blink { | 47 ## Concepts |
39 | 48 |
40 class CORE_EXPORT AnimatableShapeValue final : public AnimatableValue { | 49 ### Context |
41 public: | |
42 ~AnimatableShapeValue() override { } | |
43 static PassRefPtr<AnimatableShapeValue> create(ShapeValue* shape) | |
44 { | |
45 return adoptRef(new AnimatableShapeValue(shape)); | |
46 } | |
47 ShapeValue* getShapeValue() const { return m_shape.get(); } | |
48 | 50 |
49 protected: | 51 ### Operations |
50 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fra
ction) const override; | |
51 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; | |
52 | 52 |
53 private: | 53 ### Tags |
54 AnimatableShapeValue(ShapeValue* shape) | |
55 : m_shape(shape) | |
56 { | |
57 ASSERT(m_shape); | |
58 } | |
59 AnimatableType type() const override { return TypeShapeValue; } | |
60 bool equalTo(const AnimatableValue*) const override; | |
61 | 54 |
62 Persistent<ShapeValue> m_shape; | 55 ### Metrics |
63 }; | |
64 | 56 |
65 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableShapeValue, isShapeValue()); | 57 ## API |
66 | 58 |
67 } // namespace blink | 59 ### Internal/RPC API |
68 | 60 |
69 #endif // AnimatableShapeValue_h | 61 ### External/Client API |
| 62 |
| 63 ### RPC API |
| 64 |
| 65 ## Files in this directory |
| 66 |
| 67 Note that files and functions in this directory can be split into two |
| 68 categories: |
| 69 * Files that define core census library functions. Functions etc. in these |
| 70 files are named census\_\*, and constitute the core census library |
| 71 functionality. At some time in the future, these will become a standalone |
| 72 library. |
| 73 * Files that define functions etc. that provide a convenient interface between |
| 74 grpc and the core census functionality. These files are all named |
| 75 grpc\_\*.{c,h}, and define function names beginning with grpc\_census\_\*. |
| 76 |
OLD | NEW |