Bug 94755

Summary: [CSS Shaders] Create constants for vertex attribute sizes and offsets
Product: WebKit Reporter: Max Vujovic <mvujovic>
Component: Layout and RenderingAssignee: Max Vujovic <mvujovic>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, achicu, dino, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 71392    
Attachments:
Description Flags
Patch none

Description Max Vujovic 2012-08-22 16:28:44 PDT
Right now, vertex attribute sizes are literal constants in CustomFilterMesh.cpp like this:
static const unsigned AttachedMeshVertexSize = 4 + // vec4 a_position
    2 + // vec2 a_texCoord
    2; // vec2 a_meshCoord

It would be better to make them public members of CustomFilterMesh like this:
static const unsigned PositionAttribSize = 4;
static const unsigned TexAttribSize = 2;

That way, we can use the constants when we bind the attributes in FECustomFilter::bindProgramAndBuffers.
Comment 1 Max Vujovic 2012-10-09 11:29:02 PDT
Created attachment 167797 [details]
Patch
Comment 2 WebKit Review Bot 2012-10-09 12:49:01 PDT
Comment on attachment 167797 [details]
Patch

Clearing flags on attachment: 167797

Committed r130797: <http://trac.webkit.org/changeset/130797>
Comment 3 WebKit Review Bot 2012-10-09 12:49:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Max Vujovic 2012-10-09 13:36:40 PDT
Thanks for the review, Dean!
Comment 5 Adam Barth 2012-10-09 14:06:18 PDT
The path for CustomFilterConstants.h in the build system doesn't match the path where you placed the file.  Which is right?
Comment 6 Adam Barth 2012-10-09 14:07:44 PDT
I'm going to move the file to the filters directory.  Please fix if that's not the right thing to do.
Comment 7 Max Vujovic 2012-10-09 14:23:18 PDT
(In reply to comment #6)
> I'm going to move the file to the filters directory.  Please fix if that's not the right thing to do.

You're right. Thanks Adam!