Bug 94933

Summary: Web Inspector: [WebGL] Implement serializing WebGL state and replaying it later
Product: WebKit Reporter: Andrey Adaikin <aandrey>
Component: Web Inspector (Deprecated)Assignee: Andrey Adaikin <aandrey>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, caseq, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 94941    
Attachments:
Description Flags
Patch
pfeldman: review+
Patch to land
none
Patch to land none

Description Andrey Adaikin 2012-08-24 06:46:33 PDT
Patch to follow.
Comment 1 Andrey Adaikin 2012-08-24 07:12:59 PDT
Created attachment 160417 [details]
Patch
Comment 2 Pavel Feldman 2012-08-24 08:15:13 PDT
Comment on attachment 160417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=160417&action=review

> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:257
> +        var thisObject = /** @type {ReplayableResource} */ (Resource.toReplayable(this._thisObject, cache));

No need for ( ) in case of assignment cast.

> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:678
> +    /** @inheritDoc */

We don't use @inheritDoc

> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:782
> +            switch (uniform.type) {

You could use a map here.

> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:783
> +                case gl.FLOAT:

Do not indent case

> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:979
> +    "ACTIVE_TEXTURE",

We need to add a test so that we could track changes to this set.
Comment 3 Andrey Adaikin 2012-08-24 08:45:55 PDT
Comment on attachment 160417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=160417&action=review

>> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:257
>> +        var thisObject = /** @type {ReplayableResource} */ (Resource.toReplayable(this._thisObject, cache));
> 
> No need for ( ) in case of assignment cast.

you're right. done.

>> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:678
>> +    /** @inheritDoc */
> 
> We don't use @inheritDoc

done.

>> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:782
>> +            switch (uniform.type) {
> 
> You could use a map here.

done.

>> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:783
>> +                case gl.FLOAT:
> 
> Do not indent case

done.

>> Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js:979
>> +    "ACTIVE_TEXTURE",
> 
> We need to add a test so that we could track changes to this set.

Filed https://bugs.webkit.org/show_bug.cgi?id=94941
Comment 4 Andrey Adaikin 2012-08-24 08:47:18 PDT
Created attachment 160427 [details]
Patch to land
Comment 5 Andrey Adaikin 2012-08-24 08:57:22 PDT
Created attachment 160430 [details]
Patch to land
Comment 6 Andrey Kosyakov 2012-08-27 04:38:38 PDT
Committed r126747: <http://trac.webkit.org/changeset/126747>