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

Side by Side Diff: ui/gl/ca_renderer_layer_params.h

Issue 2186693002: Implement filter effects in Core Animation using CAFilters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp50_base
Patch Set: Add test. Created 4 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
« no previous file with comments | « ui/accelerated_widget_mac/ca_renderer_layer_tree.mm ('k') | ui/gl/ca_renderer_layer_params.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_GL_CA_RENDERER_LAYER_PARAMS_H_ 5 #ifndef UI_GL_CA_RENDERER_LAYER_PARAMS_H_
6 #define UI_GL_CA_RENDERER_LAYER_PARAMS_H_ 6 #define UI_GL_CA_RENDERER_LAYER_PARAMS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 DROP_SHADOW, 62 DROP_SHADOW,
63 MAX = DROP_SHADOW 63 MAX = DROP_SHADOW
64 }; 64 };
65 struct GL_EXPORT FilterEffect { 65 struct GL_EXPORT FilterEffect {
66 FilterEffectType type = FilterEffectType::GRAYSCALE; 66 FilterEffectType type = FilterEffectType::GRAYSCALE;
67 67
68 // For every filter other than DROP_SHADOW, only |amount| is populated. 68 // For every filter other than DROP_SHADOW, only |amount| is populated.
69 float amount = 0; 69 float amount = 0;
70 gfx::Point drop_shadow_offset; 70 gfx::Point drop_shadow_offset;
71 SkColor drop_shadow_color = 0; 71 SkColor drop_shadow_color = 0;
72
73 bool operator==(const FilterEffect& rhs) const;
72 }; 74 };
73 using FilterEffects = std::vector<FilterEffect>; 75 using FilterEffects = std::vector<FilterEffect>;
74 76
75 FilterEffects filter_effects; 77 FilterEffects filter_effects;
76 }; 78 };
77 79
78 } // namespace ui 80 } // namespace ui
79 81
82 bool operator==(const ui::CARendererLayerParams::FilterEffect& a,
83 const ui::CARendererLayerParams::FilterEffect& b);
piman 2016/07/26 20:42:43 Why the need for this one? ADL should find FilterE
erikchen 2016/07/26 21:49:26 I thought I needed this for std::vector<T>::operat
84
80 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_ 85 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_
OLDNEW
« no previous file with comments | « ui/accelerated_widget_mac/ca_renderer_layer_tree.mm ('k') | ui/gl/ca_renderer_layer_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698