RESOLVED FIXED91169
Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl
https://bugs.webkit.org/show_bug.cgi?id=91169
Summary Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl
Sailesh Agrawal
Reported 2012-07-12 17:24:37 PDT
Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl
Attachments
Patch (18.14 KB, patch)
2012-07-12 17:38 PDT, Sailesh Agrawal
no flags
Patch (18.14 KB, patch)
2012-07-12 17:48 PDT, Sailesh Agrawal
no flags
Patch (10.16 KB, patch)
2012-07-17 12:02 PDT, Sailesh Agrawal
no flags
Patch (10.36 KB, patch)
2012-07-18 11:37 PDT, Sailesh Agrawal
no flags
Patch (10.40 KB, patch)
2012-07-18 12:14 PDT, Sailesh Agrawal
no flags
Sailesh Agrawal
Comment 1 2012-07-12 17:38:48 PDT
WebKit Review Bot
Comment 2 2012-07-12 17:41:25 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
WebKit Review Bot
Comment 3 2012-07-12 17:41:45 PDT
Attachment 152110 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/Platform/ChangeLog', u'Source/Platf..." exit_code: 1 Source/WebCore/ChangeLog:22: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sailesh Agrawal
Comment 4 2012-07-12 17:48:23 PDT
Dana Jansens
Comment 5 2012-07-13 08:37:10 PDT
Comment on attachment 152114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152114&action=review > Source/WebCore/ChangeLog:10 > + No new tests (OOPS!). You'll need to add tests or justify why none are possible here. > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1675 > +const LayerRendererChromium::TextureRectProgramFlip* LayerRendererChromium::textureRectProgramFlip() bikeshed: s/Flip/Flipped/ ?
Adrienne Walker
Comment 6 2012-07-13 11:31:01 PDT
Comment on attachment 152114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152114&action=review >> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1675 >> +const LayerRendererChromium::TextureRectProgramFlip* LayerRendererChromium::textureRectProgramFlip() > > bikeshed: s/Flip/Flipped/ ? Do we really need another program? Can't the rect that's being sent to the shader be adjusted? > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h:204 > - typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectFlipAlpha> TextureIOSurfaceProgram; > + typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectAlpha> TextureRectProgram; > + typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectFlipAlpha> TextureRectProgramFlip; bikshed: I'll take other suggestions, but I don't like this renaming. TextureRect is just too ambiguous, since TextureProgram and TextureProgramFlip take texture rects as uniforms. > Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:211 > + case GraphicsContext3D::TEXTURE_2D: > + case Extensions3D::TEXTURE_RECTANGLE_ARB: { Can you reuse the CCIOSurfaceDrawQuad rather than shoehorning this into the CCTextureDrawQuad?
Sailesh Agrawal
Comment 7 2012-07-17 12:02:47 PDT
Sailesh Agrawal
Comment 8 2012-07-17 12:04:45 PDT
Comment on attachment 152114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152114&action=review >>> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1675 >>> +const LayerRendererChromium::TextureRectProgramFlip* LayerRendererChromium::textureRectProgramFlip() >> >> bikeshed: s/Flip/Flipped/ ? > > Do we really need another program? Can't the rect that's being sent to the shader be adjusted? Removed. >> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h:204 >> + typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderRGBATexRectFlipAlpha> TextureRectProgramFlip; > > bikshed: I'll take other suggestions, but I don't like this renaming. TextureRect is just too ambiguous, since TextureProgram and TextureProgramFlip take texture rects as uniforms. Removed. >> Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:211 >> + case Extensions3D::TEXTURE_RECTANGLE_ARB: { > > Can you reuse the CCIOSurfaceDrawQuad rather than shoehorning this into the CCTextureDrawQuad? Done. Reused CCIOSurfaceDrawQuad and added a flipped field.
Adrienne Walker
Comment 9 2012-07-17 17:21:00 PDT
Comment on attachment 152801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152801&action=review This patch is much improved. Thanks for all the changes. Along with rebasing to get this to apply to ToT, I have one more small change, but then this should be good: > Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:102 > - quadList.append(CCIOSurfaceDrawQuad::create(sharedQuadState, quadRect, m_ioSurfaceSize, m_ioSurfaceTextureId)); > + quadList.append(CCIOSurfaceDrawQuad::create(sharedQuadState, quadRect, m_ioSurfaceSize, m_ioSurfaceTextureId, true)); Ack, boolean parameter trap (http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html). Even if you store flipped as a boolean member variable, can you add an enum { Flipped, Unflipped } to the create function signature so it's obvious what the parameter means at the callsite?
Sailesh Agrawal
Comment 10 2012-07-18 11:37:16 PDT
Sailesh Agrawal
Comment 11 2012-07-18 11:38:03 PDT
Comment on attachment 152801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152801&action=review Rebased to tip of tree. >> Source/WebCore/platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:102 >> + quadList.append(CCIOSurfaceDrawQuad::create(sharedQuadState, quadRect, m_ioSurfaceSize, m_ioSurfaceTextureId, true)); > > Ack, boolean parameter trap (http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html). Even if you store flipped as a boolean member variable, can you add an enum { Flipped, Unflipped } to the create function signature so it's obvious what the parameter means at the callsite? Done.
Adrienne Walker
Comment 12 2012-07-18 11:40:49 PDT
Comment on attachment 153058 [details] Patch R=me. Thanks for that change. It looks like this still doesn't apply, though.
Sailesh Agrawal
Comment 13 2012-07-18 12:14:44 PDT
Sailesh Agrawal
Comment 14 2012-07-18 12:17:34 PDT
(In reply to comment #12) > (From update of attachment 153058 [details]) > R=me. Thanks for that change. It looks like this still doesn't apply, though. Oops, updated. New patch seems to apply now. Thanks for the review!
Adrienne Walker
Comment 15 2012-07-18 12:25:02 PDT
Comment on attachment 153064 [details] Patch R=meagain.
WebKit Review Bot
Comment 16 2012-07-18 13:25:23 PDT
Comment on attachment 153064 [details] Patch Clearing flags on attachment: 153064 Committed r123009: <http://trac.webkit.org/changeset/123009>
WebKit Review Bot
Comment 17 2012-07-18 13:25:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.