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

Unified Diff: cc/ipc/shared_quad_state_struct_traits.h

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « cc/ipc/cc_param_traits_unittest.cc ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/shared_quad_state_struct_traits.h
diff --git a/cc/ipc/shared_quad_state_struct_traits.h b/cc/ipc/shared_quad_state_struct_traits.h
index e9b9866b4a20f677e444d6689af56f6747d7f410..8b62a34eacc0ff2a6dabbb007c9b85d02c044a51 100644
--- a/cc/ipc/shared_quad_state_struct_traits.h
+++ b/cc/ipc/shared_quad_state_struct_traits.h
@@ -47,7 +47,7 @@ struct StructTraits<cc::mojom::SharedQuadStateDataView, OptSharedQuadState> {
}
static uint32_t blend_mode(const OptSharedQuadState& input) {
- return input.sqs->blend_mode;
+ return static_cast<uint32_t>(input.sqs->blend_mode);
}
static int32_t sorting_context_id(const OptSharedQuadState& input) {
@@ -82,7 +82,7 @@ struct StructTraits<cc::mojom::SharedQuadStateDataView, cc::SharedQuadState> {
static float opacity(const cc::SharedQuadState& sqs) { return sqs.opacity; }
static uint32_t blend_mode(const cc::SharedQuadState& sqs) {
- return sqs.blend_mode;
+ return static_cast<uint32_t>(sqs.blend_mode);
}
static int32_t sorting_context_id(const cc::SharedQuadState& sqs) {
@@ -100,9 +100,9 @@ struct StructTraits<cc::mojom::SharedQuadStateDataView, cc::SharedQuadState> {
out->is_clipped = data.is_clipped();
out->opacity = data.opacity();
- if (data.blend_mode() > SkXfermode::kLastMode)
+ if (data.blend_mode() > static_cast<int>(SkBlendMode::kLastMode))
return false;
- out->blend_mode = static_cast<SkXfermode::Mode>(data.blend_mode());
+ out->blend_mode = static_cast<SkBlendMode>(data.blend_mode());
out->sorting_context_id = data.sorting_context_id();
return true;
}
« no previous file with comments | « cc/ipc/cc_param_traits_unittest.cc ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698