Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module cc.mojom; | |
| 6 | |
| 7 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
| 8 import "ui/gfx/mojo/transform.mojom"; | |
| 9 | |
| 10 // TODO(fsamuel): This enum doesn't really belong here but SharedQuadState is | |
| 11 // the only current consumer. | |
| 12 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
| |
| 13 kClear_Mode = 0, //!< [0, 0] | |
| 14 kSrc_Mode, //!< [Sa, Sc] | |
| 15 kDst_Mode, //!< [Da, Dc] | |
| 16 kSrcOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Sc + (1 - Sa)*Dc] | |
| 17 kDstOver_Mode, //!< [Sa + Da - Sa*Da, Rc = Dc + (1 - Da)*Sc] | |
| 18 kSrcIn_Mode, //!< [Sa * Da, Sc * Da] | |
| 19 kDstIn_Mode, //!< [Sa * Da, Sa * Dc] | |
| 20 kSrcOut_Mode, //!< [Sa * (1 - Da), Sc * (1 - Da)] | |
| 21 kDstOut_Mode, //!< [Da * (1 - Sa), Dc * (1 - Sa)] | |
| 22 kSrcATop_Mode, //!< [Da, Sc * Da + (1 - Sa) * Dc] | |
| 23 kDstATop_Mode, //!< [Sa, Sa * Dc + Sc * (1 - Da)] | |
| 24 kXor_Mode, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc] | |
| 25 kPlus_Mode, //!< [Sa + Da, Sc + Dc] | |
| 26 kModulate_Mode, // multiplies all components (= alpha and color) | |
| 27 | |
| 28 // Following blend modes are defined in the CSS Compositing standard: | |
| 29 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending | |
| 30 kScreen_Mode, | |
| 31 kLastCoeffMode = kScreen_Mode, | |
| 32 | |
| 33 kOverlay_Mode, | |
| 34 kDarken_Mode, | |
| 35 kLighten_Mode, | |
| 36 kColorDodge_Mode, | |
| 37 kColorBurn_Mode, | |
| 38 kHardLight_Mode, | |
| 39 kSoftLight_Mode, | |
| 40 kDifference_Mode, | |
| 41 kExclusion_Mode, | |
| 42 kMultiply_Mode, | |
| 43 kLastSeparableMode = kMultiply_Mode, | |
| 44 | |
| 45 kHue_Mode, | |
| 46 kSaturation_Mode, | |
| 47 kColor_Mode, | |
| 48 kLuminosity_Mode, | |
| 49 kLastMode = kLuminosity_Mode | |
| 50 }; | |
| 51 | |
| 52 | |
| 53 struct SharedQuadState { | |
| 54 // gfx.mojom.Transforms quad rects into the target content space. | |
| 55 gfx.mojom.Transform quad_to_target_transform; | |
| 56 | |
| 57 // The size of the quads' originating layer in the space of the quad rects. | |
| 58 gfx.mojom.Size quad_layer_bounds; | |
| 59 | |
| 60 // The size of the visible area in the quads' originating layer, in the space | |
| 61 // of the quad rects. | |
| 62 gfx.mojom.Rect visible_quad_layer_rect; | |
| 63 | |
| 64 // This rect lives in the target content space. | |
| 65 gfx.mojom.Rect clip_rect; | |
| 66 | |
| 67 bool is_clipped; | |
| 68 float opacity; | |
| 69 SkXfermode blend_mode; | |
| 70 int32 sorting_context_id; | |
| 71 }; | |
| 72 | |
| OLD | NEW |