RESOLVED FIXED 187693
[Nicosia] Add Nicosia::PlatformLayer, Nicosia::CompositionLayer classes
https://bugs.webkit.org/show_bug.cgi?id=187693
Summary [Nicosia] Add Nicosia::PlatformLayer, Nicosia::CompositionLayer classes
Zan Dobersek
Reported 2018-07-16 03:09:37 PDT
[Nicosia] Add Nicosia::PlatformLayer, Nicosia::CompositionLayer classes
Attachments
Patch (22.59 KB, patch)
2018-07-16 04:06 PDT, Zan Dobersek
no flags
Patch for landing (22.53 KB, patch)
2018-07-16 05:09 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2018-07-16 04:06:36 PDT
Carlos Garcia Campos
Comment 2 2018-07-16 04:36:01 PDT
Comment on attachment 345088 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345088&action=review > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:45 > + PlatformLayer(uint64_t); explicit. If this is abstract, it's probably better to make the constructor protected. > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:48 > + virtual bool isCompositionLayer() const { return false; } Should this be pure virtual instead? > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:62 > + CompositionLayer(uint64_t); explicit. Since this is refcounted, I think it would be better to add a create function returning a Ref<> and make the constructor private. > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:70 > + : value(0) Could we init this below? > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:89 > + uint32_t value; with { 0 } here? > Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:112 > + uint32_t value; Same here, and only init in the constructor the values that are true, is that possible?
Zan Dobersek
Comment 3 2018-07-16 04:55:12 PDT
Comment on attachment 345088 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345088&action=review >> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:45 >> + PlatformLayer(uint64_t); > > explicit. If this is abstract, it's probably better to make the constructor protected. OK. >> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:48 >> + virtual bool isCompositionLayer() const { return false; } > > Should this be pure virtual instead? Other methods corresponding to additional derived classes will be added here. By default they all return false, but in the derived classes the appropriate method is overridden to return true. This is typical for class hierarchies that leverage is<>() and downcast<>() typecasting. >> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:62 >> + CompositionLayer(uint64_t); > > explicit. Since this is refcounted, I think it would be better to add a create function returning a Ref<> and make the constructor private. OK. >> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:89 >> + uint32_t value; > > with { 0 } here? I don't think we can because of this being an union. >> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:112 >> + uint32_t value; > > Same here, and only init in the constructor the values that are true, is that possible? Similar here, don't think it's possible because of the union.
Zan Dobersek
Comment 4 2018-07-16 05:04:54 PDT
Comment on attachment 345088 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=345088&action=review >>> Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h:89 >>> + uint32_t value; >> >> with { 0 } here? > > I don't think we can because of this being an union. Turns out we can.
Zan Dobersek
Comment 5 2018-07-16 05:09:57 PDT
Created attachment 345089 [details] Patch for landing
Zan Dobersek
Comment 6 2018-07-16 05:24:10 PDT
Comment on attachment 345089 [details] Patch for landing Clearing flags on attachment: 345089 Committed r233845: <https://trac.webkit.org/changeset/233845>
Zan Dobersek
Comment 7 2018-07-16 05:24:14 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2018-07-16 05:25:18 PDT
Note You need to log in before you can comment on or make changes to this bug.