Closed Bug 959448 Opened 6 years ago Closed 6 years ago

Convert most of LayersTypes.h to typed enums


(Core :: Graphics, defect)

Not set





(Reporter: bjacob, Assigned: bjacob)


(Whiteboard: [qa-])


(3 files)

The 3 patches here will be rolled into one for landing. They're only separate for ease of rebasing and reviewing, keeping the automatic changes separate from the manual ones.
Attachment #8359571 - Flags: review?(ncameron)
Note I'm only requesting feedback on these automatic changes, which were generated by:

find dom/ipc widget/ gfx/tests gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)LAYERS_\(NONE\|BASIC\|OPENGL\|D3D9\|D3D10\|D3D11\|CLIENT\|LAST\)\($\|[^A-Za-z0-9_]\)/\1LayersBackend::\2\3/g'

find widget gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)BUFFER_\(NONE\|BUFFERED\)\($\|[^A-Za-z0-9_]\)/\1BufferMode::\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)CLIP_\(DRAW\|DRAW_SNAPPED\|NONE\)\($\|[^A-Za-z0-9_]\)/\1DrawRegionClip::\2\3/g'

find gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SCALE_\(NONE\|STRETCH\|SENTINEL\)\($\|[^A-Za-z0-9_]\)/\1ScaleMode::\2\3/g'
Attachment #8359572 - Flags: feedback?(ncameron)
Note that LayerRenderStateFlags is left untyped, because it is used in bit-fields, which is not trivial to typeify at the moment.
Attachment #8359571 - Flags: review?(ncameron) → review+
Comment on attachment 8359572 [details] [diff] [review]
Part 2: automatic changes

Review of attachment 8359572 [details] [diff] [review]:

I'm not going to pretend I read all of that, looks like a good move in general.
Attachment #8359572 - Flags: feedback?(ncameron) → feedback+
Attachment #8359573 - Flags: review?(ncameron) → review+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.