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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/ca_renderer_layer_params.h
diff --git a/ui/gl/ca_renderer_layer_params.h b/ui/gl/ca_renderer_layer_params.h
index a6727b471384b5aadf25b21c6365a511e0ce67e5..78593e24934c8f64fba97234764ccd430126e49a 100644
--- a/ui/gl/ca_renderer_layer_params.h
+++ b/ui/gl/ca_renderer_layer_params.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_CA_RENDERER_LAYER_PARAMS_H_
#define UI_GL_CA_RENDERER_LAYER_PARAMS_H_
+#include <vector>
+
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/transform.h"
@@ -42,6 +44,35 @@ struct GL_EXPORT CARendererLayerParams {
unsigned edge_aa_mask;
float opacity;
unsigned filter;
+
+ // This is a subset of cc::FilterOperation::FilterType.
+ enum class GL_EXPORT FilterEffectType {
+ GRAYSCALE,
+ SEPIA,
+ SATURATE,
+ HUE_ROTATE,
+ INVERT,
+ BRIGHTNESS,
+ CONTRAST,
+ OPACITY,
+ BLUR,
+ DROP_SHADOW,
+ };
+ struct GL_EXPORT FilterEffect {
+ FilterEffectType type = FilterEffectType::GRAYSCALE;
+
+ // For every filter other than DROP_SHADOW, the field |data[0]| is a float
+ // reinterpret casted to a int32_t. The rest of |data| is not used.
+ // For DROP_SHADOW, the 4 fields represent:
+ // data[0]: The blur amount, reinterpret casted from a float.
+ // data[1]: x offset.
+ // data[2]: y offset.
+ // data[3]: SkColor, reinterpret casted from a uint32_t.
+ 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.
+ };
+ using FilterEffects = std::vector<FilterEffect>;
+
+ FilterEffects filter_effects;
};
} // namespace ui
« 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