Bug 152118

Summary: [TexMap] Operate with a reference to the TextureMapper wherever possible
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

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.