Bug 157302 - [TexMap] Clean up TextureMapperShaderProgram
Summary: [TexMap] Clean up TextureMapperShaderProgram
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-02 23:38 PDT by Zan Dobersek
Modified: 2016-05-04 23:42 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.81 KB, patch)
2016-05-02 23:56 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (12.52 KB, patch)
2016-05-04 00:32 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (13.87 KB, patch)
2016-05-04 02:59 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (13.03 KB, patch)
2016-05-04 23:01 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2016-05-02 23:38:37 PDT
[TexMap] Clean up TextureMapperShaderProgram
Comment 1 Zan Dobersek 2016-05-02 23:56:46 PDT
Created attachment 277983 [details]
Patch
Comment 2 Carlos Garcia Campos 2016-05-03 03:54:28 PDT
Comment on attachment 277983 [details]
Patch

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

> Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:77
>              HashMap<TextureMapperShaderProgram::Options, RefPtr<TextureMapperShaderProgram> >::AddResult result = m_programs.add(options, nullptr);
>              if (result.isNewEntry)
> -                result.iterator->value = TextureMapperShaderProgram::create(m_context, options);
> +                result.iterator->value = TextureMapperShaderProgram::create(*m_context, options);
>  
>              return result.iterator->value;

This will be easier to read using auto for the AddResult and we could probably use ::ensure() instead of ::add()
Comment 3 Zan Dobersek 2016-05-04 00:23:08 PDT
Comment on attachment 277983 [details]
Patch

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

>> Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:77
>>              return result.iterator->value;
> 
> This will be easier to read using auto for the AddResult and we could probably use ::ensure() instead of ::add()

This was done in bug #157303.
Comment 4 Zan Dobersek 2016-05-04 00:32:07 PDT
Created attachment 278068 [details]
Patch for landing
Comment 5 Zan Dobersek 2016-05-04 02:59:43 PDT
Created attachment 278073 [details]
Patch for landing
Comment 6 Zan Dobersek 2016-05-04 23:01:28 PDT
Created attachment 278160 [details]
Patch for landing
Comment 7 Zan Dobersek 2016-05-04 23:41:53 PDT
Comment on attachment 278160 [details]
Patch for landing

Clearing flags on attachment: 278160

Committed r200451: <http://trac.webkit.org/changeset/200451>
Comment 8 Zan Dobersek 2016-05-04 23:42:01 PDT
All reviewed patches have been landed.  Closing bug.