Bug 94755 - [CSS Shaders] Create constants for vertex attribute sizes and offsets
Summary: [CSS Shaders] Create constants for vertex attribute sizes and offsets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Max Vujovic
URL:
Keywords:
Depends on:
Blocks: 71392
  Show dependency treegraph
 
Reported: 2012-08-22 16:28 PDT by Max Vujovic
Modified: 2012-10-09 14:23 PDT (History)
4 users (show)

See Also:


Attachments
Patch (13.28 KB, patch)
2012-10-09 11:29 PDT, Max Vujovic
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!