Bug 152118 - [TexMap] Operate with a reference to the TextureMapper wherever possible
Summary: [TexMap] Operate with a reference to the TextureMapper wherever possible
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: 2015-12-10 03:45 PST by Zan Dobersek
Modified: 2015-12-15 03:54 PST (History)
1 user (show)

See Also:


Attachments
Patch (65.33 KB, patch)
2015-12-10 03:51 PST, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (65.25 KB, patch)
2015-12-15 01:50 PST, 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 2015-12-10 03:45:16 PST
[TexMap] Operate with a reference to the TextureMapper wherever possible
Comment 1 Zan Dobersek 2015-12-10 03:51:48 PST
Created attachment 267090 [details]
Patch

Will first run it through the EWS.
Comment 2 Martin Robinson 2015-12-10 04:15:37 PST
Comment on attachment 267090 [details]
Patch

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

r=me when this passes the EWS.

> Source/WebCore/ChangeLog:10
> +        TextureMapperLayer member variable which is null until the TextureMapper object

Perhaps you could use Optional<TextureMapper&> in this case?

> Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:81
> +    TextureMapperPaintOptions options(*m_textureMapper);

Probably should do ASSERT(m_textureMapper) here.
Comment 3 Martin Robinson 2015-12-14 08:12:55 PST
Comment on attachment 267090 [details]
Patch

Looks like it passed just fine through the EWS.
Comment 4 Zan Dobersek 2015-12-15 01:06:40 PST
Comment on attachment 267090 [details]
Patch

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

>> Source/WebCore/ChangeLog:10
>> +        TextureMapperLayer member variable which is null until the TextureMapper object
> 
> Perhaps you could use Optional<TextureMapper&> in this case?

Let's try that.

>> Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp:81
>> +    TextureMapperPaintOptions options(*m_textureMapper);
> 
> Probably should do ASSERT(m_textureMapper) here.

OK.
Comment 5 Zan Dobersek 2015-12-15 01:33:35 PST
Comment on attachment 267090 [details]
Patch

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

>>> Source/WebCore/ChangeLog:10
>>> +        TextureMapperLayer member variable which is null until the TextureMapper object
>> 
>> Perhaps you could use Optional<TextureMapper&> in this case?
> 
> Let's try that.

Optional<> doesn't work for references, and the ownership of the TextureMapper object should be kept in LayerTreeHost/CoordinatedGraphicsScene, so this isn't possible.
Comment 6 Zan Dobersek 2015-12-15 01:50:09 PST
Created attachment 267353 [details]
Patch for landing
Comment 7 Zan Dobersek 2015-12-15 03:54:39 PST
Comment on attachment 267353 [details]
Patch for landing

Clearing flags on attachment: 267353

Committed r194103: <http://trac.webkit.org/changeset/194103>
Comment 8 Zan Dobersek 2015-12-15 03:54:46 PST
All reviewed patches have been landed.  Closing bug.