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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/output/direct_renderer.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 "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "skia/ext/refptr.h" 11 #include "skia/ext/refptr.h"
12 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
13 #include "third_party/skia/include/core/SkImageFilter.h" 13 #include "third_party/skia/include/core/SkImageFilter.h"
14 #include "third_party/skia/include/core/SkRegion.h" 14 #include "third_party/skia/include/core/SkRegion.h"
15 #include "third_party/skia/include/core/SkScalar.h" 15 #include "third_party/skia/include/core/SkScalar.h"
16 #include "ui/gfx/geometry/point.h" 16 #include "ui/gfx/geometry/point.h"
17 17
18 namespace base { 18 namespace base {
19 namespace trace_event { 19 namespace trace_event {
20 class TracedValue; 20 class TracedValue;
21 } 21 }
22 22 class Value;
23 // TODO(ssid): remove these aliases after the tracing clients are moved to the
24 // new trace_event namespace. See crbug.com/451032. ETA: March 2015
25 namespace debug {
26 using ::base::trace_event::TracedValue;
27 } 23 }
28 class Value;
29 } // namespace base
30 24
31 namespace cc { 25 namespace cc {
32 26
33 class CC_EXPORT FilterOperation { 27 class CC_EXPORT FilterOperation {
34 public: 28 public:
35 enum FilterType { 29 enum FilterType {
36 GRAYSCALE, 30 GRAYSCALE,
37 SEPIA, 31 SEPIA,
38 SATURATE, 32 SATURATE,
39 HUE_ROTATE, 33 HUE_ROTATE,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Given two filters of the same type, returns a filter operation created by 216 // Given two filters of the same type, returns a filter operation created by
223 // linearly interpolating a |progress| fraction from |from| to |to|. If either 217 // linearly interpolating a |progress| fraction from |from| to |to|. If either
224 // |from| or |to| (but not both) is null, it is treated as a no-op filter of 218 // |from| or |to| (but not both) is null, it is treated as a no-op filter of
225 // the same type as the other given filter. If both |from| and |to| are null, 219 // the same type as the other given filter. If both |from| and |to| are null,
226 // or if |from| and |to| are non-null but of different types, returns a 220 // or if |from| and |to| are non-null but of different types, returns a
227 // no-op filter. 221 // no-op filter.
228 static FilterOperation Blend(const FilterOperation* from, 222 static FilterOperation Blend(const FilterOperation* from,
229 const FilterOperation* to, 223 const FilterOperation* to,
230 double progress); 224 double progress);
231 225
232 void AsValueInto(base::debug::TracedValue* value) const; 226 void AsValueInto(base::trace_event::TracedValue* value) const;
233 227
234 private: 228 private:
235 FilterOperation(FilterType type, float amount); 229 FilterOperation(FilterType type, float amount);
236 230
237 FilterOperation(FilterType type, 231 FilterOperation(FilterType type,
238 const gfx::Point& offset, 232 const gfx::Point& offset,
239 float stdDeviation, 233 float stdDeviation,
240 SkColor color); 234 SkColor color);
241 235
242 FilterOperation(FilterType, SkScalar matrix[20]); 236 FilterOperation(FilterType, SkScalar matrix[20]);
(...skipping 15 matching lines...) Expand all
258 SkColor drop_shadow_color_; 252 SkColor drop_shadow_color_;
259 skia::RefPtr<SkImageFilter> image_filter_; 253 skia::RefPtr<SkImageFilter> image_filter_;
260 SkScalar matrix_[20]; 254 SkScalar matrix_[20];
261 int zoom_inset_; 255 int zoom_inset_;
262 SkRegion region_; 256 SkRegion region_;
263 }; 257 };
264 258
265 } // namespace cc 259 } // namespace cc
266 260
267 #endif // CC_OUTPUT_FILTER_OPERATION_H_ 261 #endif // CC_OUTPUT_FILTER_OPERATION_H_
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/filter_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698