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

Side by Side Diff: cc/output/filter_operation.h

Issue 20667002: cc: Add frame data to LTHI tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 | « cc/debug/traced_value.cc ('k') | cc/output/filter_operation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_OUTPUT_FILTER_OPERATION_H_ 5 #ifndef CC_OUTPUT_FILTER_OPERATION_H_
6 #define CC_OUTPUT_FILTER_OPERATION_H_ 6 #define CC_OUTPUT_FILTER_OPERATION_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
10 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
11 #include "third_party/skia/include/core/SkScalar.h" 12 #include "third_party/skia/include/core/SkScalar.h"
12 #include "ui/gfx/point.h" 13 #include "ui/gfx/point.h"
13 14
15 namespace base {
16 class Value;
17 }
18
14 namespace cc { 19 namespace cc {
15 20
16 class CC_EXPORT FilterOperation { 21 class CC_EXPORT FilterOperation {
17 public: 22 public:
18 enum FilterType { 23 enum FilterType {
19 GRAYSCALE, 24 GRAYSCALE,
20 SEPIA, 25 SEPIA,
21 SATURATE, 26 SATURATE,
22 HUE_ROTATE, 27 HUE_ROTATE,
23 INVERT, 28 INVERT,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Given two filters of the same type, returns a filter operation created by 159 // Given two filters of the same type, returns a filter operation created by
155 // linearly interpolating a |progress| fraction from |from| to |to|. If either 160 // linearly interpolating a |progress| fraction from |from| to |to|. If either
156 // |from| or |to| (but not both) is null, it is treated as a no-op filter of 161 // |from| or |to| (but not both) is null, it is treated as a no-op filter of
157 // the same type as the other given filter. If both |from| and |to| are null, 162 // the same type as the other given filter. If both |from| and |to| are null,
158 // or if |from| and |to| are non-null but of different types, returns a 163 // or if |from| and |to| are non-null but of different types, returns a
159 // no-op filter. 164 // no-op filter.
160 static FilterOperation Blend(const FilterOperation* from, 165 static FilterOperation Blend(const FilterOperation* from,
161 const FilterOperation* to, 166 const FilterOperation* to,
162 double progress); 167 double progress);
163 168
169 scoped_ptr<base::Value> AsValue() const;
170
164 private: 171 private:
165 FilterOperation(FilterType type, float amount); 172 FilterOperation(FilterType type, float amount);
166 173
167 FilterOperation(FilterType type, 174 FilterOperation(FilterType type,
168 gfx::Point offset, 175 gfx::Point offset,
169 float stdDeviation, 176 float stdDeviation,
170 SkColor color); 177 SkColor color);
171 178
172 FilterOperation(FilterType, SkScalar matrix[20]); 179 FilterOperation(FilterType, SkScalar matrix[20]);
173 180
174 FilterOperation(FilterType type, float amount, int inset); 181 FilterOperation(FilterType type, float amount, int inset);
175 182
176 FilterType type_; 183 FilterType type_;
177 float amount_; 184 float amount_;
178 gfx::Point drop_shadow_offset_; 185 gfx::Point drop_shadow_offset_;
179 SkColor drop_shadow_color_; 186 SkColor drop_shadow_color_;
180 SkScalar matrix_[20]; 187 SkScalar matrix_[20];
181 int zoom_inset_; 188 int zoom_inset_;
182 }; 189 };
183 190
184 } // namespace cc 191 } // namespace cc
185 192
186 #endif // CC_OUTPUT_FILTER_OPERATION_H_ 193 #endif // CC_OUTPUT_FILTER_OPERATION_H_
OLDNEW
« no previous file with comments | « cc/debug/traced_value.cc ('k') | cc/output/filter_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698