Bug 43608 - [chromium] Implement GLES2Canvas/Texture in terms of GraphicsContext3D instead of direct OpenGL calls
Summary: [chromium] Implement GLES2Canvas/Texture in terms of GraphicsContext3D instea...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 22:03 PDT by James Robinson
Modified: 2010-08-06 14:59 PDT (History)
2 users (show)

See Also:


Attachments
Patch (38.00 KB, patch)
2010-08-05 22:09 PDT, James Robinson
no flags Details | Formatted Diff | Diff
Patch (38.36 KB, patch)
2010-08-06 11:45 PDT, James Robinson
no flags Details | Formatted Diff | Diff
Patch (38.09 KB, patch)
2010-08-06 12:05 PDT, James Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2010-08-05 22:03:33 PDT
[chromium] Implement GLES2Canvas/Texture in terms of GraphicsContext3D instead of direct OpenGL calls
Comment 1 James Robinson 2010-08-05 22:09:41 PDT
Created attachment 63691 [details]
Patch
Comment 2 James Robinson 2010-08-05 22:10:37 PDT
What say ye, Stephen?

I don't plan to land this until the GraphicsContext3D change lands in https://bugs.webkit.org/show_bug.cgi?id=43362 (assuming it does), but would appreciate a review.
Comment 3 James Robinson 2010-08-05 22:22:15 PDT
BTW, we should rename these classes as well and move them somewhere common at some point.
Comment 4 Stephen White 2010-08-06 07:52:22 PDT
Comment on attachment 63691 [details]
Patch

WebCore/platform/graphics/chromium/GLES2Canvas.cpp:117
 +          m_context->deleteBuffer(m_quadVertices);
While you're there, you should probably change this to m_quadIndices (bug).

WebCore/platform/graphics/chromium/GLES2Canvas.cpp:138
 +      m_context->prepareTexture();
I think this prepareTexture() call is wrong.

WebCore/platform/graphics/chromium/GLES2Canvas.cpp:167
 +      m_context->prepareTexture();
Same as above, prepareTexture() can go away (I think).

WebCore/platform/graphics/chromium/GLES2Texture.cpp:70
 +          return 0;
I think this will leak the texture.  If you're going to early-return here, you should deleteTexture().  It might be better to just move this check to the start of the function.

WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:801
 +          platformContext()->restore();
Rather than adding a platformContext()->restore here, I'd prefer that this block be moved above platformContext()->save().

Looks good other than that.
Comment 5 James Robinson 2010-08-06 11:45:29 PDT
Created attachment 63746 [details]
Patch
Comment 6 James Robinson 2010-08-06 11:46:03 PDT
PTAL.
Comment 7 James Robinson 2010-08-06 12:05:41 PDT
Created attachment 63750 [details]
Patch
Comment 8 Stephen White 2010-08-06 12:49:27 PDT
(In reply to comment #7)
> Created an attachment (id=63750) [details]
> Patch

LGTM (as a non-reviewer).
Comment 9 Dimitri Glazkov (Google) 2010-08-06 14:47:17 PDT
Comment on attachment 63750 [details]
Patch

WebCore/ChangeLog:10
 +          applying the regex s/gl([A-Z])/m_context->%1</ and removing unnecessary makeCurrent() calls.
I approve the use of regular expressions to describe the changes being made. I would expect nothing less from you thereon.
Comment 10 James Robinson 2010-08-06 14:59:15 PDT
Comment on attachment 63750 [details]
Patch

Clearing flags on attachment: 63750

Committed r64872: <http://trac.webkit.org/changeset/64872>
Comment 11 James Robinson 2010-08-06 14:59:20 PDT
All reviewed patches have been landed.  Closing bug.