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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_autogen.h

Issue 2849743002: Allow binding multiple textures to one DC Layer overlay. (Closed)
Patch Set: improve test Created 3 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 13907 matching lines...) Expand 10 before | Expand all | Expand 10 after
13918 static_assert( 13918 static_assert(
13919 offsetof(ScheduleDCLayerSharedStateCHROMIUM, z_order) == 12, 13919 offsetof(ScheduleDCLayerSharedStateCHROMIUM, z_order) == 12,
13920 "offset of ScheduleDCLayerSharedStateCHROMIUM z_order should be 12"); 13920 "offset of ScheduleDCLayerSharedStateCHROMIUM z_order should be 12");
13921 static_assert( 13921 static_assert(
13922 offsetof(ScheduleDCLayerSharedStateCHROMIUM, shm_id) == 16, 13922 offsetof(ScheduleDCLayerSharedStateCHROMIUM, shm_id) == 16,
13923 "offset of ScheduleDCLayerSharedStateCHROMIUM shm_id should be 16"); 13923 "offset of ScheduleDCLayerSharedStateCHROMIUM shm_id should be 16");
13924 static_assert( 13924 static_assert(
13925 offsetof(ScheduleDCLayerSharedStateCHROMIUM, shm_offset) == 20, 13925 offsetof(ScheduleDCLayerSharedStateCHROMIUM, shm_offset) == 20,
13926 "offset of ScheduleDCLayerSharedStateCHROMIUM shm_offset should be 20"); 13926 "offset of ScheduleDCLayerSharedStateCHROMIUM shm_offset should be 20");
13927 13927
13928 struct SetDCLayerTextureCHROMIUM {
13929 typedef SetDCLayerTextureCHROMIUM ValueType;
13930 static const CommandId kCmdId = kSetDCLayerTextureCHROMIUM;
13931 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13932 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13933
13934 static uint32_t ComputeSize() {
13935 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13936 }
13937
13938 void SetHeader() { header.SetCmd<ValueType>(); }
13939
13940 void Init(GLuint _index, GLuint _contents_texture_id) {
13941 SetHeader();
13942 index = _index;
13943 contents_texture_id = _contents_texture_id;
13944 }
13945
13946 void* Set(void* cmd, GLuint _index, GLuint _contents_texture_id) {
13947 static_cast<ValueType*>(cmd)->Init(_index, _contents_texture_id);
13948 return NextCmdAddress<ValueType>(cmd);
13949 }
13950
13951 gpu::CommandHeader header;
13952 uint32_t index;
13953 uint32_t contents_texture_id;
13954 };
13955
13956 static_assert(sizeof(SetDCLayerTextureCHROMIUM) == 12,
13957 "size of SetDCLayerTextureCHROMIUM should be 12");
13958 static_assert(offsetof(SetDCLayerTextureCHROMIUM, header) == 0,
13959 "offset of SetDCLayerTextureCHROMIUM header should be 0");
13960 static_assert(offsetof(SetDCLayerTextureCHROMIUM, index) == 4,
13961 "offset of SetDCLayerTextureCHROMIUM index should be 4");
13962 static_assert(
13963 offsetof(SetDCLayerTextureCHROMIUM, contents_texture_id) == 8,
13964 "offset of SetDCLayerTextureCHROMIUM contents_texture_id should be 8");
13965
13928 struct ScheduleDCLayerCHROMIUM { 13966 struct ScheduleDCLayerCHROMIUM {
13929 typedef ScheduleDCLayerCHROMIUM ValueType; 13967 typedef ScheduleDCLayerCHROMIUM ValueType;
13930 static const CommandId kCmdId = kScheduleDCLayerCHROMIUM; 13968 static const CommandId kCmdId = kScheduleDCLayerCHROMIUM;
13931 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 13969 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
13932 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 13970 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
13933 13971
13934 static uint32_t ComputeSize() { 13972 static uint32_t ComputeSize() {
13935 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 13973 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
13936 } 13974 }
13937 13975
13938 void SetHeader() { header.SetCmd<ValueType>(); } 13976 void SetHeader() { header.SetCmd<ValueType>(); }
13939 13977
13940 void Init(GLuint _contents_texture_id, 13978 void Init(GLuint _background_color,
13941 GLuint _background_color,
13942 GLuint _edge_aa_mask, 13979 GLuint _edge_aa_mask,
13943 GLuint _filter, 13980 GLuint _filter,
13944 GLuint _shm_id, 13981 GLuint _shm_id,
13945 GLuint _shm_offset) { 13982 GLuint _shm_offset) {
13946 SetHeader(); 13983 SetHeader();
13947 contents_texture_id = _contents_texture_id;
13948 background_color = _background_color; 13984 background_color = _background_color;
13949 edge_aa_mask = _edge_aa_mask; 13985 edge_aa_mask = _edge_aa_mask;
13950 filter = _filter; 13986 filter = _filter;
13951 shm_id = _shm_id; 13987 shm_id = _shm_id;
13952 shm_offset = _shm_offset; 13988 shm_offset = _shm_offset;
13953 } 13989 }
13954 13990
13955 void* Set(void* cmd, 13991 void* Set(void* cmd,
13956 GLuint _contents_texture_id,
13957 GLuint _background_color, 13992 GLuint _background_color,
13958 GLuint _edge_aa_mask, 13993 GLuint _edge_aa_mask,
13959 GLuint _filter, 13994 GLuint _filter,
13960 GLuint _shm_id, 13995 GLuint _shm_id,
13961 GLuint _shm_offset) { 13996 GLuint _shm_offset) {
13962 static_cast<ValueType*>(cmd)->Init(_contents_texture_id, _background_color, 13997 static_cast<ValueType*>(cmd)->Init(_background_color, _edge_aa_mask,
13963 _edge_aa_mask, _filter, _shm_id, 13998 _filter, _shm_id, _shm_offset);
13964 _shm_offset);
13965 return NextCmdAddress<ValueType>(cmd); 13999 return NextCmdAddress<ValueType>(cmd);
13966 } 14000 }
13967 14001
13968 gpu::CommandHeader header; 14002 gpu::CommandHeader header;
13969 uint32_t contents_texture_id;
13970 uint32_t background_color; 14003 uint32_t background_color;
13971 uint32_t edge_aa_mask; 14004 uint32_t edge_aa_mask;
13972 uint32_t filter; 14005 uint32_t filter;
13973 uint32_t shm_id; 14006 uint32_t shm_id;
13974 uint32_t shm_offset; 14007 uint32_t shm_offset;
13975 }; 14008 };
13976 14009
13977 static_assert(sizeof(ScheduleDCLayerCHROMIUM) == 28, 14010 static_assert(sizeof(ScheduleDCLayerCHROMIUM) == 24,
13978 "size of ScheduleDCLayerCHROMIUM should be 28"); 14011 "size of ScheduleDCLayerCHROMIUM should be 24");
13979 static_assert(offsetof(ScheduleDCLayerCHROMIUM, header) == 0, 14012 static_assert(offsetof(ScheduleDCLayerCHROMIUM, header) == 0,
13980 "offset of ScheduleDCLayerCHROMIUM header should be 0"); 14013 "offset of ScheduleDCLayerCHROMIUM header should be 0");
13981 static_assert( 14014 static_assert(offsetof(ScheduleDCLayerCHROMIUM, background_color) == 4,
13982 offsetof(ScheduleDCLayerCHROMIUM, contents_texture_id) == 4, 14015 "offset of ScheduleDCLayerCHROMIUM background_color should be 4");
13983 "offset of ScheduleDCLayerCHROMIUM contents_texture_id should be 4"); 14016 static_assert(offsetof(ScheduleDCLayerCHROMIUM, edge_aa_mask) == 8,
13984 static_assert(offsetof(ScheduleDCLayerCHROMIUM, background_color) == 8, 14017 "offset of ScheduleDCLayerCHROMIUM edge_aa_mask should be 8");
13985 "offset of ScheduleDCLayerCHROMIUM background_color should be 8"); 14018 static_assert(offsetof(ScheduleDCLayerCHROMIUM, filter) == 12,
13986 static_assert(offsetof(ScheduleDCLayerCHROMIUM, edge_aa_mask) == 12, 14019 "offset of ScheduleDCLayerCHROMIUM filter should be 12");
13987 "offset of ScheduleDCLayerCHROMIUM edge_aa_mask should be 12"); 14020 static_assert(offsetof(ScheduleDCLayerCHROMIUM, shm_id) == 16,
13988 static_assert(offsetof(ScheduleDCLayerCHROMIUM, filter) == 16, 14021 "offset of ScheduleDCLayerCHROMIUM shm_id should be 16");
13989 "offset of ScheduleDCLayerCHROMIUM filter should be 16"); 14022 static_assert(offsetof(ScheduleDCLayerCHROMIUM, shm_offset) == 20,
13990 static_assert(offsetof(ScheduleDCLayerCHROMIUM, shm_id) == 20, 14023 "offset of ScheduleDCLayerCHROMIUM shm_offset should be 20");
13991 "offset of ScheduleDCLayerCHROMIUM shm_id should be 20");
13992 static_assert(offsetof(ScheduleDCLayerCHROMIUM, shm_offset) == 24,
13993 "offset of ScheduleDCLayerCHROMIUM shm_offset should be 24");
13994 14024
13995 struct MatrixLoadfCHROMIUMImmediate { 14025 struct MatrixLoadfCHROMIUMImmediate {
13996 typedef MatrixLoadfCHROMIUMImmediate ValueType; 14026 typedef MatrixLoadfCHROMIUMImmediate ValueType;
13997 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate; 14027 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
13998 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; 14028 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
13999 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 14029 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
14000 14030
14001 static uint32_t ComputeDataSize() { 14031 static uint32_t ComputeDataSize() {
14002 return static_cast<uint32_t>(sizeof(GLfloat) * 16); 14032 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
14003 } 14033 }
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
15939 }; 15969 };
15940 15970
15941 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8, 15971 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8,
15942 "size of SetEnableDCLayersCHROMIUM should be 8"); 15972 "size of SetEnableDCLayersCHROMIUM should be 8");
15943 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0, 15973 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0,
15944 "offset of SetEnableDCLayersCHROMIUM header should be 0"); 15974 "offset of SetEnableDCLayersCHROMIUM header should be 0");
15945 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4, 15975 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4,
15946 "offset of SetEnableDCLayersCHROMIUM enabled should be 4"); 15976 "offset of SetEnableDCLayersCHROMIUM enabled should be 4");
15947 15977
15948 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 15978 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698