Chromium Code Reviews| Index: cc/ipc/shared_quad_state.mojom |
| diff --git a/cc/ipc/shared_quad_state.mojom b/cc/ipc/shared_quad_state.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0305033ff3b074c3b38db084a8a7876e5c816c13 |
| --- /dev/null |
| +++ b/cc/ipc/shared_quad_state.mojom |
| @@ -0,0 +1,72 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module cc.mojom; |
| + |
| +import "ui/gfx/geometry/mojo/geometry.mojom"; |
| +import "ui/gfx/mojo/transform.mojom"; |
| + |
| +// TODO(fsamuel): This enum doesn't really belong here but SharedQuadState is |
| +// the only current consumer. |
| +enum SkXfermode { |
|
danakj
2016/06/01 20:54:11
Erm. Include skia's header? Why are we reproducing
Fady Samuel
2016/06/01 21:02:49
In the long term, enums should be represented only
danakj
2016/06/01 21:04:20
Skia enums are going to be in mojoms? How are you
|
| + kClear_Mode = 0, //!< [0, 0] |
| + kSrc_Mode, //!< [Sa, Sc] |
| + kDst_Mode, //!< [Da, Dc] |
| + kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] |
| + kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] |
| + kSrcIn_Mode, //!< [Sa * Da, Sc * Da] |
| + kDstIn_Mode, //!< [Sa * Da, Sa * Dc] |
| + kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] |
| + kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] |
| + kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] |
| + kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] |
| + kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] |
| + kPlus_Mode, //!< [Sa + Da, Sc + Dc] |
| + kModulate_Mode, // multiplies all components (= alpha and color) |
| + |
| + // Following blend modes are defined in the CSS Compositing standard: |
| + // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending |
| + kScreen_Mode, |
| + kLastCoeffMode = kScreen_Mode, |
| + |
| + kOverlay_Mode, |
| + kDarken_Mode, |
| + kLighten_Mode, |
| + kColorDodge_Mode, |
| + kColorBurn_Mode, |
| + kHardLight_Mode, |
| + kSoftLight_Mode, |
| + kDifference_Mode, |
| + kExclusion_Mode, |
| + kMultiply_Mode, |
| + kLastSeparableMode = kMultiply_Mode, |
| + |
| + kHue_Mode, |
| + kSaturation_Mode, |
| + kColor_Mode, |
| + kLuminosity_Mode, |
| + kLastMode = kLuminosity_Mode |
| +}; |
| + |
| + |
| +struct SharedQuadState { |
| + // gfx.mojom.Transforms quad rects into the target content space. |
| + gfx.mojom.Transform quad_to_target_transform; |
| + |
| + // The size of the quads' originating layer in the space of the quad rects. |
| + gfx.mojom.Size quad_layer_bounds; |
| + |
| + // The size of the visible area in the quads' originating layer, in the space |
| + // of the quad rects. |
| + gfx.mojom.Rect visible_quad_layer_rect; |
| + |
| + // This rect lives in the target content space. |
| + gfx.mojom.Rect clip_rect; |
| + |
| + bool is_clipped; |
| + float opacity; |
| + SkXfermode blend_mode; |
| + int32 sorting_context_id; |
| +}; |
| + |