1// Copyright 2018 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// Contains the input used by filter_proto_converter to create a valid flattened 6// skia image filter. These messages were made using CreateProc and flatten 7// methods in mind so that a valid flattenable is produced. Many of the enums 8// here are copied from skia. Most of the messages are straightforward, but 9// there are a few things worth noting here. First is that many fields can be 10// written to the flattenable output as-is (such as the fields x,y and z in 11// Point3). And sometimes entire messages such as Point3 are written 12// as-is. These Message and fields can be what we call "autovisited". For fields 13// it means that they can be handled by the WriteFields method in 14// filter_proto_converter.cc. For messages it means they can be handled by 15// WriteFields and the generic Visit function (void Converter::Visit(const 16// Message& msg)) and do not need their own specific code. In this file, we will 17// put a comment "Autovisit:" before fields or messages that can be autovisited. 18// A second thing to know is the parent and child pattern we use here. In many 19// cases we need to specify one type of some kind of skia flattenable, like one 20// ColorFilter. To do this we create a message $CONCEPT + "Child" (eg 21// ColorFilterChild) that contains oneof these subtypes. In many cases these 22// subtypes (or children) will share things in common with each other. To avoid 23// re-implementing the same thing dozens of times, we give these children a 24// field called parent, that when Visited handles this common functionality. One 25// important exception to this general pattern is the LightParent message which 26// contains its own children, rather than the usual practice (which is the other 27// way around). That was done because the order in which the common 28// functionality must be done is different than in other cases (here it must 29// happen after the child functionality is handled, not before as in the other 30// cases). Finally, the last thing to know is because protobuf doesn't have a 31// good way to specify an array of a certain length so this functionality is 32// implemented by defining a message containing required fields representing 33// each element in the array (eg OverdrawColorFilter). 34 35syntax = "proto2"; 36 37package skia_image_filter_proto_converter; 38 39// Used for testcases. 40message Input { 41 required ImageFilterChild image_filter = 1; 42 required uint64 rng_seed = 2; 43} 44 45// No content when flattened. 46message LumaColorFilter {} 47 48message OverdrawColorFilter { 49 // Autovisit: 50 required uint32 val1 = 1; 51 required uint32 val2 = 2; 52 required uint32 val3 = 3; 53 required uint32 val4 = 4; 54 required uint32 val5 = 5; 55 required uint32 val6 = 6; 56} 57 58message ColorFilterChild { 59 oneof children { 60 ModeColorFilter mode_color_filter = 1; 61 ColorMatrixFilterRowMajor255 color_matrix_filter_row_major_255 = 2; 62 ComposeColorFilter compose_color_filter = 3; 63 SRGBGammaColorFilter srgb_gamma_color_filter = 4; 64 HighContrast_Filter high_contrast__filter = 5; 65 LumaColorFilter luma_color_filter = 6; 66 OverdrawColorFilter overdraw_color_filter = 7; 67 Table_ColorFilter table__color_filter = 8; 68 ToSRGBColorFilter to_srgb_color_filter = 9; 69 } 70} 71 72message TransferFn { 73 required Named named = 1; 74 required float a = 2; 75 required float b = 3; 76 required float c = 4; 77 required float d = 5; 78 required float e = 6; 79 required float f = 7; 80 required float g = 8; 81 required ThreeByFour three_by_four = 9; 82} 83 84enum Named { 85 kSRGB_Named = 0; 86 kAdobeRGB_Named = 1; 87 kSRGBLinear_Named = 2; 88 kSRGB_NonLinearBlending_Named = 3; 89} 90 91message ColorSpace_XYZ { 92 enum GammaNamed { 93 kLinear_SkGammaNamed = 0; 94 kSRGB_SkGammaNamed = 1; 95 k2Dot2Curve_SkGammaNamed = 2; 96 } 97 required GammaNamed gamma_named = 1; 98 required ThreeByFour three_by_four = 2; 99} 100 101message ColorSpaceNamed { 102 enum ColorSpaceNamedEnum { 103 kAdobeRGB_Named = 1; 104 kSRGBLinear_Named = 2; 105 } 106 required ColorSpaceNamedEnum named = 1; 107 required GammaNamed gamma_named = 2; 108} 109 110message ColorSpaceChild { 111 oneof data { 112 ICC icc = 1; 113 TransferFn transfer_fn = 2; 114 ColorSpace_XYZ color_space__xyz = 3; 115 } 116 required ColorSpaceNamed named = 4; 117} 118 119message ToSRGBColorFilter { 120 required ColorSpaceChild color_space = 1; 121} 122 123message ColorTable { 124 required float val1 = 1; 125 required float val2 = 2; 126 required float val3 = 3; 127 required float val4 = 4; 128 required float val5 = 5; 129 required float val6 = 6; 130 required float val7 = 7; 131 required float val8 = 8; 132 required float val9 = 9; 133 required float val10 = 10; 134 required float val11 = 11; 135 required float val12 = 12; 136 required float val13 = 13; 137 required float val14 = 14; 138 required float val15 = 15; 139 required float val16 = 16; 140 required float val17 = 17; 141 required float val18 = 18; 142 required float val19 = 19; 143 required float val20 = 20; 144 required float val21 = 21; 145 required float val22 = 22; 146 required float val23 = 23; 147 required float val24 = 24; 148 required float val25 = 25; 149 required float val26 = 26; 150 required float val27 = 27; 151 required float val28 = 28; 152 required float val29 = 29; 153 required float val30 = 30; 154 required float val31 = 31; 155 required float val32 = 32; 156 required float val33 = 33; 157 required float val34 = 34; 158 required float val35 = 35; 159 required float val36 = 36; 160 required float val37 = 37; 161 required float val38 = 38; 162 required float val39 = 39; 163 required float val40 = 40; 164 required float val41 = 41; 165 required float val42 = 42; 166 required float val43 = 43; 167 required float val44 = 44; 168 required float val45 = 45; 169 required float val46 = 46; 170 required float val47 = 47; 171 required float val48 = 48; 172 required float val49 = 49; 173 required float val50 = 50; 174 required float val51 = 51; 175 required float val52 = 52; 176 required float val53 = 53; 177 required float val54 = 54; 178 required float val55 = 55; 179 required float val56 = 56; 180 required float val57 = 57; 181 required float val58 = 58; 182 required float val59 = 59; 183 required float val60 = 60; 184 required float val61 = 61; 185 required float val62 = 62; 186 required float val63 = 63; 187 required float val64 = 64; 188} 189 190message Table_ColorFilter { 191 optional ColorTable table_a = 1; 192 optional ColorTable table_r = 2; 193 optional ColorTable table_g = 3; 194 optional ColorTable table_b = 4; 195} 196 197// See SkHighContrastFilter.cpp 198message HighContrast_Filter { 199 enum InvertStyle { 200 kNoInvert = 0; 201 kInvertBrightness = 1; 202 kInvertLightness = 2; 203 } 204 205 required bool grayscale = 1; 206 required InvertStyle invert_style = 2; 207 // Autovisit up to here 208 required float contrast = 3; 209} 210 211// Autovisit: 212message SRGBGammaColorFilter { 213 enum Direction { 214 kLinearToSRGB = 0; 215 kSRGBToLinear = 1; 216 } 217 required Direction direction = 1; 218} 219 220message ComposeColorFilter { 221 required ColorFilterChild outer = 1; 222 required ColorFilterChild inner = 2; 223} 224 225message ColorFilterMatrix { 226 // Autovisit: 227 required float val1 = 1; 228 required float val2 = 2; 229 required float val3 = 3; 230 required float val4 = 4; 231 required float val5 = 5; 232 required float val6 = 6; 233 required float val7 = 7; 234 required float val8 = 8; 235 required float val9 = 9; 236 required float val10 = 10; 237 required float val11 = 11; 238 required float val12 = 12; 239 required float val13 = 13; 240 required float val14 = 14; 241 required float val15 = 15; 242 required float val16 = 16; 243 required float val17 = 17; 244 required float val18 = 18; 245 required float val19 = 19; 246 required float val20 = 20; 247} 248 249// See SkColorMatrixFilterRowMajor255.cpp (https://goo.gl/qwF8DK) 250message ColorMatrixFilterRowMajor255 { 251 // Autovisit: 252 required ColorFilterMatrix color_filter_matrix = 1; 253} 254 255message ModeColorFilter { 256 required uint32 color = 1; 257 required BlendMode mode = 2; 258} 259 260message Rectangle { 261 required float left = 1; 262 required float top = 2; 263 required float right = 3; 264 required float bottom = 4; 265} 266 267message IRect { 268 required int32 left = 1; 269 required int32 top = 2; 270 required int32 right = 3; 271 required int32 bottom = 4; 272} 273 274message CropRectangle { 275 required Rectangle rectangle = 1; 276 required uint32 flags = 2; 277} 278 279message PictureInfo { 280 // TODO(metzman): Figure out how to keep this up to date. 281 enum Version { 282 V0 = 56; 283 V1 = 57; 284 V2 = 58; 285 V3 = 59; 286 kRemoveHeaderFlags_Version = 60; 287 V4 = 61; 288 } 289 290 required Version version = 1; 291 required Rectangle rectangle = 2; 292 required uint32 flags = 3; 293} 294 295message PictureData { 296 // SkPictureData.cpp (https://goo.gl/hDnKjz) 297 repeated PictureTagChild tags = 1; 298 required ReaderPictureTag reader_tag = 2; 299} 300 301enum BlendMode { 302 kClear = 0; 303 kSrc = 1; 304 kDst = 2; 305 // TODO(metzman): Uncomment this when bug 786133 is fixed. 306 // kSrcOver = 3; 307 kDstOver = 4; 308 kSrcIn = 5; 309 kDstIn = 6; 310 kSrcOut = 7; 311 kDstOut = 8; 312 kSrcATop = 9; 313 kDstATop = 10; 314 kXor = 11; 315 kPlus = 12; 316 kModulate = 13; 317 kScreenAndLastCoeffMode = 14; 318 kOverlay = 15; 319 kDarken = 16; 320 kLighten = 17; 321 kColorDodge = 18; 322 kColorBurn = 19; 323 kHardLight = 20; 324 kSoftLight = 21; 325 kDifference = 22; 326 kExclusion = 23; 327 kLastSeparableModeAndMultiply = 24; 328 kHue = 25; 329 kSaturation = 26; 330 kColor = 27; 331 kLuminosity = 28; 332} 333 334message Paint { 335 required float text_size = 1; 336 required float text_scale_x = 2; 337 required float text_skew_x = 3; 338 required float stroke_width = 4; 339 required float stroke_miter = 5; 340 required uint32 color = 6; 341 // Autovisit up to here 342 343 enum TextEncoding { 344 kUTF8_TextEncoding = 0; 345 kUTF16_TextEncoding = 1; 346 kUTF32_TextEncoding = 2; 347 kGlyphID_TextEncoding = 3; 348 } 349 350 enum Style { 351 kFill_Style = 0; 352 kStroke_Style = 1; 353 kStrokeAndFill_Style = 2; // no longer needed/used 354 } 355 356 enum StrokeCap { 357 kButt_Cap = 0; 358 kRound_Cap = 1; 359 kSquare_Cap = 2; 360 } 361 362 enum StrokeJoin { 363 kMiter_Join = 0; 364 kRound_Join = 1; 365 kBevel_Join = 2; 366 } 367 368 required StrokeCap stroke_cap = 7; 369 required StrokeJoin stroke_join = 8; 370 required Style style = 9; 371 required TextEncoding text_encoding = 10; 372 required BlendMode blend_mode = 11; 373 optional PaintEffects effects = 12; 374 375 enum PaintFlags { 376 kAntiAlias_Flag = 0x01; 377 kDither_Flag = 0x04; 378 kFakeBoldText_Flag = 0x20; 379 kLinearText_Flag = 0x40; 380 kSubpixelText_Flag = 0x80; 381 kDevKernText_Flag = 0x100; 382 kLCDRenderText_Flag = 0x200; 383 kEmbeddedBitmapText_Flag = 0x400; 384 kAutoHinting_Flag = 0x800; 385 kVerticalText_Flag = 0x1000; 386 kGenA8FromLCD_Flag = 0x2000; 387 kAllFlags = 0xFFFF; 388 } 389 390 enum Hinting { 391 kNo_Hinting = 0; 392 kSlight_Hinting = 1; 393 kNormal_Hinting = 2; 394 kFull_Hinting = 3; 395 } 396 397 enum Align { 398 kLeft_Align = 0; 399 kCenter_Align = 1; 400 kRight_Align = 2; 401 } 402 403 // Stuff that gets packed into flags. 404 required PaintFlags flags = 13; 405 required Hinting hinting = 14; 406 required Align align = 15; 407 required FilterQuality filter_quality = 16; 408} 409 410message Point { 411 required float x = 1; 412 required float y = 2; 413} 414 415message PathEffectChild { 416 oneof children { 417 PairPathEffect pair_path_effect = 1; 418 Path2DPathEffect path_2d_path_effect = 2; 419 Line2DPathEffect line_2d_path_effect = 3; 420 CornerPathEffect corner_path_effect = 4; 421 DashImpl dash_impl = 5; 422 DiscretePathEffect discrete_path_effect = 6; 423 Path1DPathEffect path_1d_path_effect = 7; 424 } 425} 426 427// Autovisit: 428message CornerPathEffect { 429 // 0 is a very bad choice for radius, so make field optional with a default of 430 // 1. 431 optional float radius = 1 [default = 1]; 432} 433 434message Path2DPathEffect { 435 required Matrix matrix = 1; 436 required Path path = 2; 437} 438 439message Line2DPathEffect { 440 required Matrix matrix = 1; 441 required float width = 2; 442} 443 444message DashImpl { 445 required float phase = 1; 446 required float interval_1 = 2; 447 required float interval_2 = 3; 448 repeated float intervals = 4; 449} 450 451// Autovisit: 452message DiscretePathEffect { 453 required float seg_length = 1; 454 required float perterb = 2; 455 required uint32 seed_assist = 3; 456} 457 458message Path1DPathEffect { 459 enum Style { 460 kTranslate_Style = 0; 461 kRotate_Style = 1; 462 kMorph_Style = 2; 463 } 464 required float advance = 1; 465 required Path path = 2; 466 required float initial_offset = 3; 467 required Style style = 4; 468} 469 470message Path { 471 enum Convexity { 472 kUnknown_Convexity = 0; 473 kConvex_Convexity = 1; 474 kConcave_Convexity = 2; 475 } 476 enum FirstDirection { 477 kCW_FirstDirection = 0; 478 kCCW_FirstDirection = 1; 479 kUnknown_FirstDirection = 2; 480 } 481 enum SerializationVersion { 482 kPathPrivFirstDirection_Version = 1; 483 kPathPrivLastMoveToIndex_Version = 2; 484 kPathPrivTypeEnumVersion = 3; 485 } 486 487 required Convexity convexity = 1; 488 required uint32 fill_type = 2; // Should be 8 bytes 489 required FirstDirection first_direction = 3; 490 required bool is_volatile = 4; 491 required SerializationVersion serialized_version = 5; 492 required int32 last_move_to_index = 6; 493 required PathRef path_ref = 7; 494} 495 496message ValidVerb { 497 enum Value { 498 kMove_Verb = 0; 499 kLine_Verb = 1; 500 kQuad_Verb = 2; 501 kConic_Verb = 3; 502 kCubic_Verb = 4; 503 kClose_Verb = 5; 504 // We don't actually want kDone_Verb. 505 } 506 required Value value = 1; 507 required Point point1 = 2; 508 required Point point2 = 3; 509 required Point point3 = 4; 510 required float conic_weight = 5; 511} 512 513message PathRef { 514 repeated ValidVerb verbs = 1; 515 required bool is_finite = 2; 516 required uint32 segment_mask = 3; 517 required ValidVerb first_verb = 4; 518} 519 520message PairPathEffect { 521 enum Type { 522 SUM = 1; 523 COMPOSE = 2; 524 } 525 required Type type = 1; 526 required PathEffectChild path_effect_1 = 2; 527 required PathEffectChild path_effect_2 = 3; 528} 529 530message ShaderChild { 531 oneof children { 532 ColorShader color_shader = 1; 533 Color4Shader color_4_shader = 2; 534 ColorFilterShader color_filter_shader = 3; 535 ComposeShader compose_shader = 4; 536 EmptyShader empty_shader = 5; 537 ImageShader image_shader = 6; 538 PictureShader picture_shader = 7; 539 PerlinNoiseShaderImpl perlin_noise_shader_impl = 8; 540 LocalMatrixShader local_matrix_shader = 9; 541 LinearGradient linear_gradient = 10; 542 RadialGradient radial_gradient = 11; 543 SweepGradient sweep_gradient = 12; 544 TwoPointConicalGradient two_point_conical_gradient = 13; 545 } 546} 547 548message TwoPointConicalGradient { 549 required GradientParent parent = 1; 550 // Autovisit: 551 required Point center1 = 2; 552 required Point center2 = 3; 553 required float radius1 = 4; 554 required float radius2 = 5; 555} 556 557message SweepGradient { 558 required GradientParent parent = 1; 559 // Autovisit: 560 required Point center = 2; 561 // TODO(metzman): Handle case when buffer.fVersion >= 562 // kTileInfoInSweepGradient_Version or fVersion != 0. 563 required float bias = 3; 564 required float scale = 4; 565} 566 567message RadialGradient { 568 required GradientParent parent = 1; 569 // Autovisit: 570 required Point center = 2; 571 required float radius = 3; 572} 573 574message Color4f { 575 // Autovisit: 576 required float r = 1; 577 required float g = 2; 578 required float b = 3; 579 required float a = 4; 580} 581 582// Note that this cannot be named "Descriptor" since that name is used by 583// protobuf's reflection methods 584message GradientDescriptor { 585 optional ColorSpaceChild color_space = 1; 586 optional float pos = 2; 587 optional Matrix local_matrix = 3; 588 required TileMode tile_mode = 4; 589 required uint32 grad_flags = 5; // <= UINT8_MAX 590 repeated Color4f colors = 6; 591} 592 593// Contained by children 594message GradientParent { 595 required GradientDescriptor gradient_descriptor = 1; 596} 597 598message LinearGradient { 599 required GradientParent parent = 1; 600 // Autovisit: 601 required Point start = 2; 602 required Point end = 3; 603} 604 605message LocalMatrixShader { 606 required Matrix matrix = 1; 607 required ShaderChild proxy_shader = 2; 608} 609 610// Autovisit: 611message PerlinNoiseShaderImpl { 612 enum Type { 613 kFractalNoise_Type = 0; 614 kTurbulence_Type = 1; 615 kImprovedNoise_Type = 2; 616 } 617 required Type type = 1; 618 required float base_frequency_x = 2; 619 required float base_frequency_y = 3; 620 required int32 octaves = 4; 621 required float seed = 5; 622 required int32 height = 6; 623 required int32 width = 7; 624} 625 626message PictureShader { 627 required Matrix matrix = 1; 628 // Autovisit: 629 required TileMode tmx = 2; 630 required TileMode tmy = 3; 631 required Rectangle rect = 4; 632} 633 634enum TileMode { 635 kClamp_TileMode = 0; 636 kRepeat_TileMode = 1; 637 kMirror_TileMode = 2; 638} 639 640// Autovisit: 641message ImageShader { 642 required TileMode tile_mode_x = 1; 643 required TileMode tile_mode_y = 2; 644 required Matrix matrix = 3; 645 required Image image = 4; 646} 647 648message ImageInfo { 649 enum AlphaType { 650 kUnknown_SkAlphaType = 0; 651 kOpaque_SkAlphaType = 1; 652 kPremul_SkAlphaType = 2; 653 kUnpremul_SkAlphaType = 3; 654 } 655 656 enum ColorType { 657 kUnknown_Stored_SkColorType = 0; 658 kAlpha_8_Stored_SkColorType = 1; 659 kRGB_565_Stored_SkColorType = 2; 660 kARGB_4444_Stored_SkColorType = 3; 661 kRGBA_8888_Stored_SkColorType = 4; 662 kBGRA_8888_Stored_SkColorType = 5; 663 kIndex_8_Stored_SkColorType_DEPRECATED = 6; 664 kGray_8_Stored_SkColorType = 7; 665 kRGBA_F16_Stored_SkColorType = 8; 666 } 667 668 required int32 width = 1; 669 required int32 height = 2; 670 required AlphaType alpha_type = 3; 671 required ColorType color_type = 4; 672 required ColorSpaceChild color_space = 5; 673} 674 675message ImageData { 676 repeated uint32 data = 1; 677} 678 679// TODO(metzman): Finish implementing using ImageInfo. 680message Image { 681 // Must be non-negative. 682 required int32 width = 1; 683 required int32 height = 2; 684 required ImageData data = 3; 685 // Must be nonnegative. 686 required int32 origin_x = 4; 687 required int32 origin_y = 5; 688} 689 690// Autovisit: 691message EmptyShader {} 692 693message ComposeShader { 694 required ShaderChild dst = 1; 695 required ShaderChild src = 2; 696 // Autovisit: 697 required BlendMode mode = 3; 698 required float lerp_t = 4; 699} 700 701message ColorFilterShader { 702 required ShaderChild shader = 1; 703 required ColorFilterChild filter = 2; 704} 705 706message Color4Shader { 707 required uint32 color = 1; 708} 709 710// Autovisit: 711message ColorShader { 712 required uint32 color = 1; 713} 714 715message LooperChild { 716 required LayerDrawLooper layer_draw_looper = 1; 717} 718 719message LayerDrawLooper { 720 repeated LayerInfo layer_infos = 1; 721} 722 723message LayerInfo { 724 required int32 paint_bits = 1; 725 required BlendMode color_mode = 2; 726 required Point point = 3; 727 required bool post_translate = 4; 728 // Autovisit up to here 729 required Paint paint = 5; 730} 731 732message MaskFilterChild { 733 oneof children { 734 BlurMaskFilter blur_mask_filter_impl = 1; 735 EmbossMaskFilter emboss_mask_filter = 2; 736 } 737} 738 739message EmbossMaskFilterLight { 740 required float direction_x = 1; 741 required float direction_y = 2; 742 required float direction_z = 3; 743 required uint32 ambient = 4; 744 required uint32 specular = 5; 745} 746 747message EmbossMaskFilter { 748 required EmbossMaskFilterLight light = 1; 749 required float blur_sigma = 2; 750} 751 752enum BlurStyle { 753 kNormal_SkBlurStyle = 0; 754 kSolid_SkBlurStyle = 1; 755 kOuter_SkBlurStyle = 2; 756 kInner_SkBlurStyle = 3; 757} 758 759// Copied from https://goo.gl/Yy5Euw 760enum BlurFlags { 761 kNone_BlurFlag = 0x00; 762 kIgnoreTransform_BlurFlag = 0x01; 763 kHighQuality_BlurFlag = 0x02; 764 kAll_BlurFlag = 0x03; 765} 766 767message BlurMaskFilter { 768 required float sigma = 1; 769 required BlurStyle style = 2; 770 required BlurFlags flags = 3; 771 required Rectangle occluder = 4; 772} 773 774message PaintEffects { 775 optional PathEffectChild path_effect = 1; 776 optional ShaderChild shader = 2; 777 optional MaskFilterChild mask_filter = 3; 778 optional ColorFilterChild color_filter = 4; 779 optional LooperChild looper = 5; 780 optional ImageFilterChild image_filter = 6; 781} 782 783message RecordingData { 784 repeated Paint paints = 1; 785} 786 787message PaintImageFilter { 788 required ImageFilterParent image_filter_parent = 1; 789 required Paint paint = 2; 790} 791 792message PictureTagChild { 793 oneof children { 794 PaintPictureTag paint = 1; 795 PathPictureTag path = 2; 796 Image image = 3; 797 Vertices vertices = 4; 798 TextBlob text_blob = 5; 799 } 800} 801 802message TextBlob { 803 required Rectangle bounds = 1; 804 enum GlyphPositioning { 805 kDefault_Positioning = 0; 806 kHorizontal_Positioning = 1; 807 kFull_Positioning = 2; 808 } 809 required GlyphPositioning glyph_positioning = 2; 810 required bool extended = 3; 811 required Point offset = 4; 812 required Paint paint = 5; 813 required GlyphAndPosAndCluster glyph_pos_cluster_1 = 6; 814 required GlyphAndPosAndCluster glyph_pos_cluster_2 = 7; 815 repeated GlyphAndPosAndCluster glyph_pos_clusters = 8; 816 repeated uint32 text = 9; 817} 818 819message GlyphAndPosAndCluster { 820 required uint32 glyph = 1; 821 required float position_1 = 2; 822 required float position_2 = 3; 823 required uint32 cluster = 4; 824} 825 826message Vertices { 827 enum VertexMode { 828 kTriangles_VertexMode = 0; 829 kTriangleStrip_VertexMode = 1; 830 kTriangleFan_VertexMode = 2; 831 } 832 required VertexMode mode = 1; 833 required bool has_texs = 2; 834 required bool has_colors = 3; 835 repeated VertexTexColor vertex_text_colors = 4; 836 repeated uint32 indices = 5; 837} 838 839message VertexTexColor { 840 required Point vertex = 1; 841 required Point tex = 2; 842 required Point color = 3; 843} 844 845message ReaderPictureTag { 846 required uint32 first_bytes = 1; 847 repeated uint32 later_bytes = 2; 848} 849 850message PaintPictureTag { 851 required Paint paint = 1; 852} 853 854message PathPictureTag { 855 required Path path = 1; 856} 857 858message Picture { 859 required PictureInfo info = 1; 860 optional PictureData data = 2; 861} 862 863// Copied with comments from skia. 864// Enums in C++ that don't have set values start at 0. 865enum FilterQuality { 866 // fastest but lowest quality, typically nearest-neighbor 867 kNone_SkFilterQuality = 0; 868 kLow_SkFilterQuality = 1; // typically bilerp 869 kMedium_SkFilterQuality = 2; // typically bilerp + mipmaps for down-scaling 870 // slowest but highest quality, typically bicubic or better 871 kHigh_SkFilterQuality = 3; 872} 873 874message PictureImageFilter { 875 enum PictureResolution { 876 kDeviceSpace_PictureResolution = 0; 877 kLocalSpace_PictureResolution = 1; 878 } 879 880 optional Picture picture = 1; 881 required Rectangle crop_rectangle = 2; 882 required PictureResolution resolution = 3; 883} 884 885message Matrix { 886 required float val1 = 1; 887 required float val2 = 2; 888 required float val3 = 3; 889 required float val4 = 4; 890 required float val5 = 5; 891 required float val6 = 6; 892 required float val7 = 7; 893 required float val8 = 8; 894 required float val9 = 9; 895} 896 897message MatrixImageFilter { 898 required ImageFilterParent image_filter_parent = 1; 899 required Matrix transform = 2; 900 required FilterQuality filter_quality = 3; 901} 902 903message ImageFilterChild { 904 oneof children { 905 PaintImageFilter paint_image_filter = 1; 906 MatrixImageFilter matrix_image_filter = 2; 907 SpecularLightingImageFilter specular_lighting_image_filter = 3; 908 ArithmeticImageFilter arithmetic_image_filter = 4; 909 AlphaThresholdFilterImpl alpha_threshold_filter_impl = 5; 910 BlurImageFilterImpl blur_image_filter_impl = 6; 911 ColorFilterImageFilter color_filter_image_filter = 7; 912 ComposeImageFilter compose_image_filter = 8; 913 DisplacementMapEffect displacement_map_effect = 9; 914 DropShadowImageFilter drop_shadow_image_filter = 10; 915 LocalMatrixImageFilter local_matrix_image_filter = 11; 916 MagnifierImageFilter magnifier_image_filter = 13; 917 MatrixConvolutionImageFilter matrix_convolution_image_filter = 14; 918 MergeImageFilter merge_image_filter = 15; 919 DilateImageFilter dilate_image_filter = 16; 920 ErodeImageFilter erode_image_filter = 17; 921 OffsetImageFilter offset_image_filter = 18; 922 PictureImageFilter picture_image_filter = 19; 923 TileImageFilter tile_image_filter = 20; 924 XfermodeImageFilter_Base xfermode_image_filter__base = 21; 925 XfermodeImageFilter xfermode_image_filter = 22; 926 DiffuseLightingImageFilter diffuse_lighting_image_filter = 23; 927 ImageSource image_source = 24; 928 } 929} 930 931message DiffuseLightingImageFilter { 932 required ImageFilterParent parent = 1; 933 required LightParent light = 2; 934 required float surface_scale = 3; 935 required float kd = 4; 936} 937 938message XfermodeImageFilter { 939 required ImageFilterParent parent = 1; 940 required BlendMode mode = 2; 941} 942 943message XfermodeImageFilter_Base { 944 required ImageFilterParent parent = 1; 945 required BlendMode mode = 2; 946} 947 948message TileImageFilter { 949 required ImageFilterParent parent = 1; 950 required Rectangle src = 2; 951 required Rectangle dst = 3; 952} 953 954message OffsetImageFilter { 955 required ImageFilterParent parent = 1; 956 required Point offset = 2; 957} 958 959message ErodeImageFilter { 960 required ImageFilterParent parent = 1; 961 required int32 width = 2; 962 required int32 height = 3; 963} 964 965message DilateImageFilter { 966 required ImageFilterParent parent = 1; 967 required int32 width = 2; 968 required int32 height = 3; 969} 970 971message MergeImageFilter { 972 required ImageFilterParent parent = 1; 973} 974 975message MatrixConvolutionImageFilter { 976 required ImageFilterParent parent = 1; 977 required int32 width = 2; 978 required int32 height = 3; 979 // Since we can't specify a field of repeated bytes that is width*height, use 980 // a kernel_seed to seed a RNG to get the number of bytes we need. 981 required int64 kernel_seed = 4; 982 required float gain = 5; 983 required float bias = 6; 984 required int32 offset_x = 7; 985 required int32 offset_y = 8; 986 required TileMode tile_mode = 9; 987 required bool convolve_alpha = 10; 988} 989 990message MagnifierImageFilter { 991 required ImageFilterParent parent = 1; 992 required Rectangle src = 2; 993 required float inset = 3; 994} 995 996message LocalMatrixImageFilter { 997 required ImageFilterParent parent = 1; 998 required Matrix matrix = 2; 999} 1000 1001message ImageSource { 1002 required FilterQuality filter_quality = 1; 1003 required Rectangle src = 2; 1004 required Rectangle dst = 3; 1005 // / Autovisit 1006 required Image image = 4; 1007} 1008 1009message DropShadowImageFilter { 1010 enum ShadowMode { 1011 kDrawShadowAndForeground_ShadowMode = 0; 1012 kDrawShadowOnly_ShadowMode = 1; 1013 kDrawShadowOnly_ShadowMod = 2; 1014 } 1015 required ImageFilterParent parent = 1; 1016 // Autovisit: 1017 required float dx = 2; 1018 required float dy = 3; 1019 required float sigma_x = 4; 1020 required float sigma_y = 5; 1021 required uint32 color = 6; 1022 required ShadowMode shadow_mode = 7; 1023} 1024 1025message DisplacementMapEffect { 1026 enum ChannelSelectorType { 1027 kUnknown_ChannelSelectorType = 0; 1028 kR_ChannelSelectorType = 1; 1029 kG_ChannelSelectorType = 2; 1030 kB_ChannelSelectorType = 3; 1031 kA_ChannelSelectorTyp = 4; 1032 } 1033 1034 required ImageFilterParent parent = 1; 1035 // Autovisit: 1036 required ChannelSelectorType xsel = 2; 1037 required ChannelSelectorType ysel = 3; 1038 required float scale = 4; 1039} 1040 1041message ComposeImageFilter { 1042 required ImageFilterParent parent = 1; 1043} 1044 1045message ColorFilterImageFilter { 1046 required ImageFilterParent parent = 1; 1047 required ColorFilterChild color_filter = 2; 1048} 1049 1050message BlurImageFilterImpl { 1051 required ImageFilterParent parent = 1; 1052 required float sigma_x = 2; 1053 required float sigma_y = 3; 1054 required TileMode mode = 4; 1055} 1056 1057message AlphaThresholdFilterImpl { 1058 required ImageFilterParent parent = 1; 1059 required float inner = 2; 1060 required float outer = 3; 1061 required Region rgn = 4; 1062} 1063 1064message Region { 1065 required IRect bounds = 1; 1066 // TODO(metzman): Properly implement complex regions. 1067} 1068 1069message RegionComplex { 1070 required int32 y_span_count = 1; 1071 required int32 interval_count = 2; 1072 repeated int32 run_seed = 3; 1073} 1074 1075message ArithmeticImageFilter { 1076 required ImageFilterParent parent = 1; 1077 1078 // Ignored see SkXfermodeImageFilter_Base::LegacyArithmeticCreateProc. 1079 // Converter will write a mode even without a corresponding field. 1080 // required BlendMode mode = 2; 1081 1082 // Autovisit: 1083 required float val1 = 2; 1084 required float val2 = 3; 1085 required float val3 = 4; 1086 required float val4 = 5; 1087 required bool enforce_pm_color = 6; 1088} 1089 1090// Contained by children 1091message ImageFilterParent { 1092 required ImageFilterChild default_input = 1; 1093 repeated ImageFilterChild inputs = 2; 1094 required CropRectangle crop_rectangle = 3; 1095} 1096 1097// Autovisit: 1098message Point3 { 1099 required float x = 1; 1100 required float y = 2; 1101 required float z = 3; 1102} 1103 1104// Contains children 1105message LightParent { 1106 required Point3 color = 1; 1107 required LightChild light_child = 2; 1108} 1109 1110// Autovisit: 1111message DistantLight { 1112 required Point3 direction = 1; 1113} 1114 1115// Autovisit: 1116message PointLight { 1117 required Point3 location = 1; 1118} 1119 1120// See SkLightingImageFilter.cpp 1121// Autovisit: 1122message SpotLight { 1123 required Point3 location = 1; 1124 required Point3 target = 2; 1125 required float specular_exponent = 3; 1126 required float cos_outer_cone_angle = 4; 1127 required float cos_inner_cone_angle = 5; 1128 required float cone_scale = 6; 1129 required Point3 s = 7; 1130} 1131 1132message LightChild { 1133 oneof children { 1134 PointLight point_light = 1; 1135 SpotLight spot_light = 2; 1136 } 1137 required DistantLight distant_light = 3; 1138} 1139 1140message SpecularLightingImageFilter { 1141 required ImageFilterParent image_filter_parent = 1; 1142 required LightParent light = 2; 1143 required float surface_scale = 3; 1144 required float ks = 4; 1145 required float shininess = 5; 1146} 1147 1148enum GammaNamed { 1149 kLinear_SkGammaNamed = 0; 1150 kSRGB_SkGammaNamed = 1; 1151 k2Dot2Curve_SkGammaNamed = 2; 1152 kNonStandard_SkGammaNamed = 3; 1153} 1154 1155message ThreeByFour { 1156 required float val1 = 1; 1157 required float val2 = 2; 1158 required float val3 = 3; 1159 required float val4 = 4; 1160 required float val5 = 5; 1161 required float val6 = 6; 1162 required float val7 = 7; 1163 required float val8 = 8; 1164 required float val9 = 9; 1165 required float val10 = 10; 1166 required float val11 = 11; 1167 required float val12 = 12; 1168} 1169 1170enum ICCTag { 1171 kTAG_rXYZ = 0; 1172 kTAG_gXYZ = 1; 1173 kTAG_bXYZ = 2; 1174 kTAG_rTRC = 3; 1175 kTAG_gTRC = 4; 1176 kTAG_bTRC = 5; 1177 kTAG_kTRC = 6; 1178 kTAG_A2B0 = 7; 1179 kTAG_CurveType = 8; 1180 kTAG_ParaCurveType = 9; 1181 kTAG_TextType = 10; 1182} 1183 1184// This contains a lot of commented out fields since they are in the actual 1185// struct this message represents, but are unused. We don't define them and 1186// WriteIgnoredFields is used to write them rather than wasting LPM's time 1187// setting them. However, we leave them here commented out for reference, and 1188// we don't use their numbers in case we use them in the future. 1189message ICC { 1190 enum Profile { 1191 Display_Profile = 0; 1192 Input_Profile = 1; 1193 Output_Profile = 2; 1194 ColorSpace_Profile = 3; 1195 } 1196 1197 enum InputColorSpace { 1198 RGB_ColorSpace = 0; 1199 CMYK_ColorSpace = 1; 1200 Gray_ColorSpace = 2; 1201 } 1202 enum PCS { 1203 kXYZ_PCSSpace = 0; 1204 kLAB_PCSSpace = 1; 1205 } 1206 enum RenderingIntent { 1207 kPerceptual = 0; 1208 kRelative = 1; 1209 kSaturation = 2; 1210 kAbsolute = 3; 1211 } 1212 required Named named = 34; 1213 // required uint32 size = 1; // Always 132. 1214 // required uint32 cmm_type_ignored = 2; 1215 required uint32 version = 3; 1216 required Profile profile_class = 4; 1217 required InputColorSpace input_color_space = 5; 1218 required PCS pcs = 6; 1219 // required uint32 datetime_ignored_1 = 7; 1220 // required uint32 datetime_ignored_2 = 8; 1221 // required uint32 datetime_ignored_3 = 9; 1222 // Always SkSetFourByteTag('a', 'c', 's', 'p') 1223 // required uint32 signature = 10; 1224 // required uint32 platform_target_ignored = 11; 1225 // required uint32 flags_ignored = 12; 1226 // required uint32 device_manufacturer_ignored = 13; 1227 // required uint32 device_model_ignored = 14; 1228 // required uint32 device_attributes_ignored_1 = 15; 1229 // required uint32 device_attributes_ignored_2 = 16; 1230 required RenderingIntent rendering_intent = 17; 1231 required int32 illuminant_x = 18; 1232 required int32 illuminant_y = 19; 1233 required int32 illuminant_z = 20; 1234 1235 // required uint32 creator_ignored = 21; 1236 // required uint32 profileid_ignored_1 = 22; 1237 // required uint32 profileid_ignored_2 = 23; 1238 // required uint32 profileid_ignored_3 = 24; 1239 // required uint32 profileid_ignored_4 = 25; 1240 // required uint32 reserved_ignored_1 = 26; 1241 // required uint32 reserved_ignored_2 = 27; 1242 // required uint32 reserved_ignored_3 = 28; 1243 // required uint32 reserved_ignored_4 = 29; 1244 // required uint32 reserved_ignored_5 = 30; 1245 // required uint32 reserved_ignored_6 = 31; 1246 // required uint32 reserved_ignored_7 = 32; 1247 1248 // We'll use colorspaces instead 1249 required ICCColorSpace color_space = 33; 1250 // repeated Tag tags = 33; 1251} 1252 1253message ICCColorSpace { 1254 oneof color_space { 1255 ICCXYZ xyz = 1; 1256 ICCGray gray = 2; 1257 } 1258 // Default. 1259 required ICCA2B0 a2b0 = 3; 1260} 1261 1262message ICCXYZ {} 1263 1264message ICCGray {} 1265 1266message ICCA2B0 { 1267 oneof type { 1268 ICCA2B0Lut8 lut8 = 1; 1269 ICCA2B0Lut16 lut16 = 2; 1270 } 1271 // Default. 1272 required ICCA2B0AToB atob = 3; 1273} 1274 1275enum Ignored { VALUE = 0; } 1276 1277enum UInt8 { 1278 VAL0 = 0; 1279 VAL1 = 1; 1280 VAL2 = 2; 1281 VAL3 = 3; 1282 VAL4 = 4; 1283 VAL5 = 5; 1284 VAL6 = 6; 1285 VAL7 = 7; 1286 VAL8 = 8; 1287 VAL9 = 9; 1288 VAL10 = 10; 1289 VAL11 = 11; 1290 VAL12 = 12; 1291 VAL13 = 13; 1292 VAL14 = 14; 1293 VAL15 = 15; 1294 VAL16 = 16; 1295 VAL17 = 17; 1296 VAL18 = 18; 1297 VAL19 = 19; 1298 VAL20 = 20; 1299 VAL21 = 21; 1300 VAL22 = 22; 1301 VAL23 = 23; 1302 VAL24 = 24; 1303 VAL25 = 25; 1304 VAL26 = 26; 1305 VAL27 = 27; 1306 VAL28 = 28; 1307 VAL29 = 29; 1308 VAL30 = 30; 1309 VAL31 = 31; 1310 VAL32 = 32; 1311 VAL33 = 33; 1312 VAL34 = 34; 1313 VAL35 = 35; 1314 VAL36 = 36; 1315 VAL37 = 37; 1316 VAL38 = 38; 1317 VAL39 = 39; 1318 VAL40 = 40; 1319 VAL41 = 41; 1320 VAL42 = 42; 1321 VAL43 = 43; 1322 VAL44 = 44; 1323 VAL45 = 45; 1324 VAL46 = 46; 1325 VAL47 = 47; 1326 VAL48 = 48; 1327 VAL49 = 49; 1328 VAL50 = 50; 1329 VAL51 = 51; 1330 VAL52 = 52; 1331 VAL53 = 53; 1332 VAL54 = 54; 1333 VAL55 = 55; 1334 VAL56 = 56; 1335 VAL57 = 57; 1336 VAL58 = 58; 1337 VAL59 = 59; 1338 VAL60 = 60; 1339 VAL61 = 61; 1340 VAL62 = 62; 1341 VAL63 = 63; 1342 VAL64 = 64; 1343 VAL65 = 65; 1344 VAL66 = 66; 1345 VAL67 = 67; 1346 VAL68 = 68; 1347 VAL69 = 69; 1348 VAL70 = 70; 1349 VAL71 = 71; 1350 VAL72 = 72; 1351 VAL73 = 73; 1352 VAL74 = 74; 1353 VAL75 = 75; 1354 VAL76 = 76; 1355 VAL77 = 77; 1356 VAL78 = 78; 1357 VAL79 = 79; 1358 VAL80 = 80; 1359 VAL81 = 81; 1360 VAL82 = 82; 1361 VAL83 = 83; 1362 VAL84 = 84; 1363 VAL85 = 85; 1364 VAL86 = 86; 1365 VAL87 = 87; 1366 VAL88 = 88; 1367 VAL89 = 89; 1368 VAL90 = 90; 1369 VAL91 = 91; 1370 VAL92 = 92; 1371 VAL93 = 93; 1372 VAL94 = 94; 1373 VAL95 = 95; 1374 VAL96 = 96; 1375 VAL97 = 97; 1376 VAL98 = 98; 1377 VAL99 = 99; 1378 VAL100 = 100; 1379 VAL101 = 101; 1380 VAL102 = 102; 1381 VAL103 = 103; 1382 VAL104 = 104; 1383 VAL105 = 105; 1384 VAL106 = 106; 1385 VAL107 = 107; 1386 VAL108 = 108; 1387 VAL109 = 109; 1388 VAL110 = 110; 1389 VAL111 = 111; 1390 VAL112 = 112; 1391 VAL113 = 113; 1392 VAL114 = 114; 1393 VAL115 = 115; 1394 VAL116 = 116; 1395 VAL117 = 117; 1396 VAL118 = 118; 1397 VAL119 = 119; 1398 VAL120 = 120; 1399 VAL121 = 121; 1400 VAL122 = 122; 1401 VAL123 = 123; 1402 VAL124 = 124; 1403 VAL125 = 125; 1404 VAL126 = 126; 1405 VAL127 = 127; 1406 VAL128 = 128; 1407 VAL129 = 129; 1408 VAL130 = 130; 1409 VAL131 = 131; 1410 VAL132 = 132; 1411 VAL133 = 133; 1412 VAL134 = 134; 1413 VAL135 = 135; 1414 VAL136 = 136; 1415 VAL137 = 137; 1416 VAL138 = 138; 1417 VAL139 = 139; 1418 VAL140 = 140; 1419 VAL141 = 141; 1420 VAL142 = 142; 1421 VAL143 = 143; 1422 VAL144 = 144; 1423 VAL145 = 145; 1424 VAL146 = 146; 1425 VAL147 = 147; 1426 VAL148 = 148; 1427 VAL149 = 149; 1428 VAL150 = 150; 1429 VAL151 = 151; 1430 VAL152 = 152; 1431 VAL153 = 153; 1432 VAL154 = 154; 1433 VAL155 = 155; 1434 VAL156 = 156; 1435 VAL157 = 157; 1436 VAL158 = 158; 1437 VAL159 = 159; 1438 VAL160 = 160; 1439 VAL161 = 161; 1440 VAL162 = 162; 1441 VAL163 = 163; 1442 VAL164 = 164; 1443 VAL165 = 165; 1444 VAL166 = 166; 1445 VAL167 = 167; 1446 VAL168 = 168; 1447 VAL169 = 169; 1448 VAL170 = 170; 1449 VAL171 = 171; 1450 VAL172 = 172; 1451 VAL173 = 173; 1452 VAL174 = 174; 1453 VAL175 = 175; 1454 VAL176 = 176; 1455 VAL177 = 177; 1456 VAL178 = 178; 1457 VAL179 = 179; 1458 VAL180 = 180; 1459 VAL181 = 181; 1460 VAL182 = 182; 1461 VAL183 = 183; 1462 VAL184 = 184; 1463 VAL185 = 185; 1464 VAL186 = 186; 1465 VAL187 = 187; 1466 VAL188 = 188; 1467 VAL189 = 189; 1468 VAL190 = 190; 1469 VAL191 = 191; 1470 VAL192 = 192; 1471 VAL193 = 193; 1472 VAL194 = 194; 1473 VAL195 = 195; 1474 VAL196 = 196; 1475 VAL197 = 197; 1476 VAL198 = 198; 1477 VAL199 = 199; 1478 VAL200 = 200; 1479 VAL201 = 201; 1480 VAL202 = 202; 1481 VAL203 = 203; 1482 VAL204 = 204; 1483 VAL205 = 205; 1484 VAL206 = 206; 1485 VAL207 = 207; 1486 VAL208 = 208; 1487 VAL209 = 209; 1488 VAL210 = 210; 1489 VAL211 = 211; 1490 VAL212 = 212; 1491 VAL213 = 213; 1492 VAL214 = 214; 1493 VAL215 = 215; 1494 VAL216 = 216; 1495 VAL217 = 217; 1496 VAL218 = 218; 1497 VAL219 = 219; 1498 VAL220 = 220; 1499 VAL221 = 221; 1500 VAL222 = 222; 1501 VAL223 = 223; 1502 VAL224 = 224; 1503 VAL225 = 225; 1504 VAL226 = 226; 1505 VAL227 = 227; 1506 VAL228 = 228; 1507 VAL229 = 229; 1508 VAL230 = 230; 1509 VAL231 = 231; 1510 VAL232 = 232; 1511 VAL233 = 233; 1512 VAL234 = 234; 1513 VAL235 = 235; 1514 VAL236 = 236; 1515 VAL237 = 237; 1516 VAL238 = 238; 1517 VAL239 = 239; 1518 VAL240 = 240; 1519 VAL241 = 241; 1520 VAL242 = 242; 1521 VAL243 = 243; 1522 VAL244 = 244; 1523 VAL245 = 245; 1524 VAL246 = 246; 1525 VAL247 = 247; 1526 VAL248 = 248; 1527 VAL249 = 249; 1528 VAL250 = 250; 1529 VAL251 = 251; 1530 VAL252 = 252; 1531 VAL253 = 253; 1532 VAL254 = 254; 1533 VAL255 = 255; 1534} 1535 1536enum InputChannels { 1537 ONE = 1; 1538 TWO = 2; 1539 THREE = 3; 1540} 1541 1542enum OutputChannels { 1543 // Can't be named THREE or else it will conflict with THREE in InputChannels. 1544 // It doesn't matter, since we only use the numeric value on the converter 1545 // side. 1546 _THREE = 3; 1547} 1548 1549message ICCA2B0AToB { 1550 required InputChannels input_channels = 1; 1551 required OutputChannels output_channels = 2; // Must be 3 1552} 1553 1554message ICCA2B0Lut16 { 1555 required ICCA2B0Lut8 lut8 = 1; 1556 1557 // TODO(metzman): allow these to be specified rather than generated. 1558 // required uint32 in_table_entries = 2; // uint16_t 1559 // required uint32 out_table_entries = 3; // uint16_t 1560 required uint64 in_table_seed = 4; 1561 required uint64 out_table_seed = 5; 1562} 1563 1564message ICCA2B0Lut8 { 1565 required Ignored ignored_byte_4 = 1; 1566 required Ignored ignored_byte_5 = 2; 1567 required Ignored ignored_byte_6 = 3; 1568 required Ignored ignored_byte_7 = 4; 1569 // Needs to agree with output_channels 1570 required OutputChannels input_channels = 5; 1571 required OutputChannels output_channels = 6; // Must be 3 1572 required UInt8 clut_grid_points = 7; 1573 required Ignored ignored_byte_11 = 8; 1574 required Matrix matrix = 9; 1575 required OneChannelGammas input_gammas_1 = 10; 1576 required OneChannelGammas input_gammas_2 = 11; 1577 required OneChannelGammas input_gammas_3 = 12; 1578 required uint64 clut_bytes_seed = 13; 1579 required OutputGammas output_gammas = 14; 1580} 1581 1582message OneChannelGammas { 1583 required int32 bytes_0_3 = 1; 1584 required int32 bytes_4_7 = 2; 1585 required int32 bytes_8_11 = 3; 1586 required int32 bytes_12_15 = 4; 1587 required int32 bytes_16_19 = 5; 1588 required int32 bytes_20_23 = 6; 1589 required int32 bytes_24_27 = 7; 1590 required int32 bytes_28_31 = 8; 1591 required int32 bytes_32_35 = 9; 1592 required int32 bytes_36_39 = 10; 1593 required int32 bytes_40_43 = 11; 1594 required int32 bytes_44_47 = 12; 1595 required int32 bytes_48_51 = 13; 1596 required int32 bytes_52_55 = 14; 1597 required int32 bytes_56_59 = 15; 1598 required int32 bytes_60_63 = 16; 1599 required int32 bytes_64_67 = 17; 1600 required int32 bytes_68_71 = 18; 1601 required int32 bytes_72_75 = 19; 1602 required int32 bytes_76_79 = 20; 1603 required int32 bytes_80_83 = 21; 1604 required int32 bytes_84_87 = 22; 1605 required int32 bytes_88_91 = 23; 1606 required int32 bytes_92_95 = 24; 1607 required int32 bytes_96_99 = 25; 1608 required int32 bytes_100_103 = 26; 1609 required int32 bytes_104_107 = 27; 1610 required int32 bytes_108_111 = 28; 1611 required int32 bytes_112_115 = 29; 1612 required int32 bytes_116_119 = 30; 1613 required int32 bytes_120_123 = 31; 1614 required int32 bytes_124_127 = 32; 1615 required int32 bytes_128_131 = 33; 1616 required int32 bytes_132_135 = 34; 1617 required int32 bytes_136_139 = 35; 1618 required int32 bytes_140_143 = 36; 1619 required int32 bytes_144_147 = 37; 1620 required int32 bytes_148_151 = 38; 1621 required int32 bytes_152_155 = 39; 1622 required int32 bytes_156_159 = 40; 1623 required int32 bytes_160_163 = 41; 1624 required int32 bytes_164_167 = 42; 1625 required int32 bytes_168_171 = 43; 1626 required int32 bytes_172_175 = 44; 1627 required int32 bytes_176_179 = 45; 1628 required int32 bytes_180_183 = 46; 1629 required int32 bytes_184_187 = 47; 1630 required int32 bytes_188_191 = 48; 1631 required int32 bytes_192_195 = 49; 1632 required int32 bytes_196_199 = 50; 1633 required int32 bytes_200_203 = 51; 1634 required int32 bytes_204_207 = 52; 1635 required int32 bytes_208_211 = 53; 1636 required int32 bytes_212_215 = 54; 1637 required int32 bytes_216_219 = 55; 1638 required int32 bytes_220_223 = 56; 1639 required int32 bytes_224_227 = 57; 1640 required int32 bytes_228_231 = 58; 1641 required int32 bytes_232_235 = 59; 1642 required int32 bytes_236_239 = 60; 1643 required int32 bytes_240_243 = 61; 1644 required int32 bytes_244_247 = 62; 1645 required int32 bytes_248_251 = 63; 1646 required int32 bytes_252_255 = 64; 1647} 1648 1649// Since output gammas are 3 times the size of input gammas, make 1650message OutputGammas { 1651 required OneChannelGammas bytes_0_255 = 1; 1652 required OneChannelGammas bytes_255_511 = 2; 1653 required OneChannelGammas bytes_512_768 = 3; 1654} 1655