Chromium Code Reviews| Index: cc/proto/display_item.proto |
| diff --git a/cc/proto/display_item.proto b/cc/proto/display_item.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4e47f2e30e1adb700f28b01f5d44217e49ca278d |
| --- /dev/null |
| +++ b/cc/proto/display_item.proto |
| @@ -0,0 +1,93 @@ |
| +// Copyright 2015 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. |
| + |
| +syntax = "proto2"; |
| + |
| +import "skregion.proto"; |
| +import "skrrect.proto"; |
| +import "skxfermode.proto"; |
| +import "rect.proto"; |
| +import "rectf.proto"; |
| +import "transform.proto"; |
| + |
| +option optimize_for = LITE_RUNTIME; |
| + |
| +package cc.proto; |
| + |
| +message DisplayItemListSettings { |
| + optional bool use_cached_picture = 1; |
| +} |
| + |
| +message DisplayItemList { |
| + repeated DisplayItem items = 1; |
| + optional cc.proto.Rect layer_rect = 2; |
| + optional DisplayItemListSettings settings = 3; |
| +} |
| + |
| +message DisplayItem { |
| + enum Type { |
| + Type_Clip = 1; |
| + Type_EndClip = 2; |
| + Type_ClipPath = 3; |
| + Type_EndClipPath = 4; |
| + Type_Compositing = 5; |
| + Type_EndCompositing = 6; |
| + Type_Drawing = 7; |
| + Type_Filter = 8; |
| + Type_EndFilter = 9; |
| + Type_FloatClip = 10; |
| + Type_EndFloatClip = 11; |
| + Type_Transform = 12; |
| + Type_EndTransform = 13; |
| + } |
| + |
| + optional Type type = 1; |
| + |
| + // Unique DisplayItem types. |type| determines which one (if any) is valid. |
| + optional ClipDisplayItem details_clip = 1000; |
|
vmpstr
2015/10/26 17:46:17
Why does this start from 1000?
David Trainor- moved to gerrit
2015/10/26 20:42:56
It's a little easier to keep the number spaces fai
|
| + optional ClipPathDisplayItem details_clip_path = 1001; |
| + optional CompositingDisplayItem details_compositing = 1002; |
| + optional DrawingDisplayItem details_drawing = 1003; |
| + optional FilterDisplayItem details_filter = 1004; |
|
vmpstr
2015/10/26 17:46:17
maybe instead of details_foo, it can be foo_item?
David Trainor- moved to gerrit
2015/10/26 20:42:56
Done.
|
| + optional FloatClipDisplayItem details_float_clip = 1005; |
| + optional TransformDisplayItem details_transform = 1006; |
| +} |
| + |
| +message ClipDisplayItem { |
| + optional cc.proto.Rect clip_rect = 1; |
| + |
| + repeated cc.proto.SkRRect rounded_rects = 2; |
| +} |
| + |
| +message ClipPathDisplayItem { |
| + optional cc.proto.SkRegion.Op clip_op = 1; |
| + optional bool antialias = 2; |
| + optional bytes clip_path = 3; /* SkPath */ |
| +} |
| + |
| +message CompositingDisplayItem { |
| + optional uint32 alpha = 1; |
| + |
| + optional cc.proto.SkXfermode.Mode mode = 2; |
| + optional cc.proto.RectF bounds = 3; |
| + optional bytes color_filter = 4; /* SkColorFilter */ |
| +} |
| + |
| +message DrawingDisplayItem { |
| + optional bytes picture = 1; /* SkPicture */ |
| +} |
| + |
| +message FilterDisplayItem { |
| + optional cc.proto.RectF bounds = 1; |
| + |
| + // TODO(dtrainor): Support FilterOperations. |
| +} |
| + |
| +message FloatClipDisplayItem { |
| + optional cc.proto.RectF clip_rect = 1; |
| +} |
| + |
| +message TransformDisplayItem { |
| + optional cc.proto.Transform transform = 1; |
| +} |