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

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

Issue 2164613003: Add logic to convert from RenderPassDrawQuads to CALayerOverlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp41_rpdq_converter
Patch Set: Static asserts. Created 4 years, 5 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 | « tools/metrics/histograms/histograms.xml ('k') | no next file » | 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>
9
8 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
9 #include "ui/gfx/geometry/rect_f.h" 11 #include "ui/gfx/geometry/rect_f.h"
10 #include "ui/gfx/transform.h" 12 #include "ui/gfx/transform.h"
11 #include "ui/gl/gl_export.h" 13 #include "ui/gl/gl_export.h"
12 14
13 namespace gl { 15 namespace gl {
14 class GLImage; 16 class GLImage;
15 } 17 }
16 18
17 namespace ui { 19 namespace ui {
(...skipping 17 matching lines...) Expand all
35 const gfx::Rect clip_rect; 37 const gfx::Rect clip_rect;
36 unsigned sorting_context_id; 38 unsigned sorting_context_id;
37 const gfx::Transform transform; 39 const gfx::Transform transform;
38 gl::GLImage* image; 40 gl::GLImage* image;
39 const gfx::RectF contents_rect; 41 const gfx::RectF contents_rect;
40 const gfx::Rect rect; 42 const gfx::Rect rect;
41 unsigned background_color; 43 unsigned background_color;
42 unsigned edge_aa_mask; 44 unsigned edge_aa_mask;
43 float opacity; 45 float opacity;
44 unsigned filter; 46 unsigned filter;
47
48 // This is a subset of cc::FilterOperation::FilterType.
49 enum class GL_EXPORT FilterEffectType {
50 GRAYSCALE,
51 SEPIA,
52 SATURATE,
53 HUE_ROTATE,
54 INVERT,
55 BRIGHTNESS,
56 CONTRAST,
57 OPACITY,
58 BLUR,
59 DROP_SHADOW,
60 };
61 struct GL_EXPORT FilterEffect {
62 FilterEffectType type = FilterEffectType::GRAYSCALE;
63
64 // For every filter other than DROP_SHADOW, the field |data[0]| is a float
65 // reinterpret casted to a int32_t. The rest of |data| is not used.
66 // For DROP_SHADOW, the 4 fields represent:
67 // data[0]: The blur amount, reinterpret casted from a float.
68 // data[1]: x offset.
69 // data[2]: y offset.
70 // data[3]: SkColor, reinterpret casted from a uint32_t.
71 int32_t data[4] = {0};
ccameron 2016/07/21 05:44:56 I'd think it better to do: float amount = 0; g
erikchen 2016/07/21 16:28:04 duh, good point. Done.
72 };
73 using FilterEffects = std::vector<FilterEffect>;
74
75 FilterEffects filter_effects;
45 }; 76 };
46 77
47 } // namespace ui 78 } // namespace ui
48 79
49 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_ 80 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_
OLDNEW
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698