[Cairo] Use GraphicsContextImplCairo for ImageBuffer context
Created attachment 332015 [details] WIP
Created attachment 332128 [details] Patch
(In reply to Zan Dobersek from comment #2) > Created attachment 332128 [details] > Patch Given this changes code in GraphicsContext, GraphicsContextImpl and DisplayList::Recorder, I'd prefer if Simon or Myles can review this.
Comment on attachment 332128 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332128&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:60 > + bool hasPlatformContext() const override { return false; } > + PlatformGraphicsContext* platformContext() const override { return nullptr; } I wonder why we have hasPlatformContext, since platformContext() returns a pointer we could simply check its return value no?
(In reply to Zan Dobersek from comment #3) > (In reply to Zan Dobersek from comment #2) > > Created attachment 332128 [details] > > Patch > > Given this changes code in GraphicsContext, GraphicsContextImpl and > DisplayList::Recorder, I'd prefer if Simon or Myles can review this. I was already reviewing this when you added this comment. Changes look sane to me, but I agree it would be better if graphics guys double check it.
Comment on attachment 332128 [details] Patch I like this. At some point I'd like the CG drawing to be a graphicsContextImpl too.
Comment on attachment 332128 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332128&action=review >> Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:60 >> + PlatformGraphicsContext* platformContext() const override { return nullptr; } > > I wonder why we have hasPlatformContext, since platformContext() returns a pointer we could simply check its return value no? This was done to exactly mirror the GraphicsContext methods. It might be possible to just deduce this from the platformContext() value like you propose, but I'd wait on that until more implementations (e.g. GraphicsContextImplCG) see whether the extra method is necessary.
Comment on attachment 332128 [details] Patch Clearing flags on attachment: 332128 Committed r227594: <https://trac.webkit.org/changeset/227594>
All reviewed patches have been landed. Closing bug.
<rdar://problem/36856107>