WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
64214
[chromium] Delete the unused legacy accelerated canvas 2d code
https://bugs.webkit.org/show_bug.cgi?id=64214
Summary
[chromium] Delete the unused legacy accelerated canvas 2d code
James Robinson
Reported
2011-07-08 16:26:10 PDT
[chromium] Delete the unused legacy accelerated canvas 2d code
Attachments
Patch
(172.37 KB, patch)
2011-07-08 16:29 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
merged up to ToT
(172.36 KB, patch)
2011-07-08 16:40 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(175.13 KB, patch)
2011-07-08 18:01 PDT
,
James Robinson
senorblanco
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2011-07-08 16:29:57 PDT
Created
attachment 100182
[details]
Patch
James Robinson
Comment 2
2011-07-08 16:32:34 PDT
Note that I've removed the LoopBlinn code from all the project files, but I haven't deleted the files yet since the skia guys still may want to reference it. I filed
https://bugs.webkit.org/show_bug.cgi?id=64216
to cover deleting that code from the repo. Diffstat for this patch: 36 files changed, 256 insertions(+), 2930 deletions(-)
James Robinson
Comment 3
2011-07-08 16:40:49 PDT
Created
attachment 100184
[details]
merged up to ToT
Stephen White
Comment 4
2011-07-08 16:48:44 PDT
Comment on
attachment 100182
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=100182&action=review
Looks good for the most part. I'd like to get an ok from other ports on the GraphicsContext3D changes before I give it an r+.
> Source/WebCore/page/Page.h:269 > + GraphicsContext3D* sharedGraphicsContext3D();
Should be renamed graphicsContext3D(). Also, since the calls are no longer going through GraphicsContext3D in Chrome, and I doubt they will on any other platform either, I'd prefer that we create and own a GrContext (or another wrapper class unrelated to GraphicsCOntext3D) directly here, via a platform-specific typedef. That could be done in a later patch, though.
> Source/WebCore/page/Page.h:328 > + RefPtr<GraphicsContext3D> m_sharedGraphicsContext3D;
s/sharedG/g/
> Source/WebCore/platform/graphics/GraphicsContext.cpp:710 > +void GraphicsContext::setSharedGraphicsContext3D(GraphicsContext3D*, DrawingBuffer*, const IntSize&)
s/Shared//
> Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:1240 > +void GraphicsContext::syncSoftwareCanvas()
Should we rename this function too? Maybe willDraw() or something?
> Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp:691 > +void PlatformContextSkia::setSharedGraphicsContext3D(GraphicsContext3D* context, DrawingBuffer* drawingBuffer, const WebCore::IntSize& size)
s/Shared//
> Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:187 > + void setSharedGraphicsContext3D(GraphicsContext3D*, DrawingBuffer*, const IntSize&);
s/Shared//
James Robinson
Comment 5
2011-07-08 16:56:39 PDT
(In reply to
comment #4
)
> (From update of
attachment 100182
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=100182&action=review
> > Looks good for the most part. I'd like to get an ok from other ports on the GraphicsContext3D changes before I give it an r+. > > > Source/WebCore/page/Page.h:269 > > + GraphicsContext3D* sharedGraphicsContext3D(); > > Should be renamed graphicsContext3D().
Sure
> > Also, since the calls are no longer going through GraphicsContext3D in Chrome, and I doubt they will on any other platform either, I'd prefer that we create and own a GrContext (or another wrapper class unrelated to GraphicsCOntext3D) directly here, via a platform-specific typedef. That could be done in a later patch, though.
Yeah, it'd be nice to clean this up. One difficulty is that a GrContext doesn't actually hold a GL context, it needs to live on top of one. I agree that we should clean this up in a follow-up patch.
> > Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:1240 > > +void GraphicsContext::syncSoftwareCanvas() > > Should we rename this function too? Maybe willDraw() or something?
That could work. What this really does it make the GraphicsContext3D associated with the GrContext current, which arguably should be done by the implementation of GraphicsContext, not by the caller. I'll see if I can reasonably just get rid of this call completely.
James Robinson
Comment 6
2011-07-08 18:01:31 PDT
Created
attachment 100195
[details]
Patch
James Robinson
Comment 7
2011-07-08 18:03:32 PDT
Turns out syncSoftwareCanvas() can go away completely if I set the context to current in ImageBufferSkia's draw() calls. The only changes to GraphicsContext in this patch are removing now-unnecessary calls and renaming setSharedGraphicsContext3D()->setGraphicsContext3D(), so it should be pretty uncontroversial. I removed the 'Shared' from interface names everywhere except for on Page because I think it's helpful to indicate that the context is supposed to be shared by everyone using that Page. We can definitely rename it to something better at the same time that we change the type to something better, but for now I'd rather leave it alone.
Stephen White
Comment 8
2011-07-12 07:31:28 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (From update of
attachment 100182
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=100182&action=review
> > > > Looks good for the most part. I'd like to get an ok from other ports on the GraphicsContext3D changes before I give it an r+. > > > > > Source/WebCore/page/Page.h:269 > > > + GraphicsContext3D* sharedGraphicsContext3D(); > > > > Should be renamed graphicsContext3D(). > > Sure > > > > > Also, since the calls are no longer going through GraphicsContext3D in Chrome, and I doubt they will on any other platform either, I'd prefer that we create and own a GrContext (or another wrapper class unrelated to GraphicsCOntext3D) directly here, via a platform-specific typedef. That could be done in a later patch, though. > > Yeah, it'd be nice to clean this up. One difficulty is that a GrContext doesn't actually hold a GL context, it needs to live on top of one. I agree that we should clean this up in a follow-up patch.
What we really need is some kind of bare-bones class to represent the context used for the command buffer stubs, since that's what Ganesh is calling. I was going to suggest we go back to using GLES2Context, but it seems that it was removed from the WebKit API long ago.
> > > Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:1240 > > > +void GraphicsContext::syncSoftwareCanvas() > > > > Should we rename this function too? Maybe willDraw() or something? > > That could work. What this really does it make the GraphicsContext3D associated with the GrContext current, which arguably should be done by the implementation of GraphicsContext, not by the caller. I'll see if I can reasonably just get rid of this call completely.
Stephen White
Comment 9
2011-07-12 07:37:36 PDT
Comment on
attachment 100195
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=100195&action=review
Not your fault, but IWBN if SkGpuDevice could handle all the makeCurrent()'s internally instead of GraphicsContextSkia.cpp having to do it. Looks ok. r=me
> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:119 > + context->platformContext()->makeGrContextCurrent();
Are you sure this one is still needed? useGPU() is always false for Ganesh, so this whole clause should probably go away.
> Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:127 > + context->platformContext()->makeGrContextCurrent();
This wasn't here before.. was this a bug? Or is the lower level no longer doing a makeGrContextCurrent?
> Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:74 > SkiaGPU
Nit: could be demoted to a bool, or perhaps even removed (m_gpuContext != NULL could be used, I think).
> Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:183 > bool canAccelerate() const;
Do we still need this?
Stephen White
Comment 10
2011-07-12 07:54:00 PDT
(In reply to
comment #9
)
> > Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:127 > > + context->platformContext()->makeGrContextCurrent(); > > This wasn't here before.. was this a bug? Or is the lower level no longer doing a makeGrContextCurrent?
Ignore this.. I see this is related to your comment that "Turns out syncSoftwareCanvas() can go away completely if I set the context to current in ImageBufferSkia's draw() calls."
James Robinson
Comment 11
2011-07-12 16:25:59 PDT
(In reply to
comment #9
)
> (From update of
attachment 100195
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=100195&action=review
> > Not your fault, but IWBN if SkGpuDevice could handle all the makeCurrent()'s internally instead of GraphicsContextSkia.cpp having to do it.
YES! The way this was explained to me many moons ago was that SkGpuDevice had no notion of what a GL context was, so it was the responsibility of the caller to set the right context current before making any skia calls that might make GL calls. I think it's a big pain in the butt.
> > Looks ok. r=me > > > Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:119 > > + context->platformContext()->makeGrContextCurrent(); > > Are you sure this one is still needed? useGPU() is always false for Ganesh, so this whole clause should probably go away. > > > Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp:127 > > + context->platformContext()->makeGrContextCurrent(); > > This wasn't here before.. was this a bug? Or is the lower level no longer doing a makeGrContextCurrent?
It was essentially a bug, the syncSoftwareCanvas() call was setting the correct context previously.
> > > Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:74 > > SkiaGPU > > Nit: could be demoted to a bool, or perhaps even removed (m_gpuContext != NULL could be used, I think).
Removed the enum, changed useSkiaGPU() to just null-test m_gpuContext.
> > > Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:183 > > bool canAccelerate() const; > > Do we still need this?
Nope, nuking.
James Robinson
Comment 12
2011-07-12 17:20:20 PDT
Committed
r90872
: <
http://trac.webkit.org/changeset/90872
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug