<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[197506] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/197506">197506</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-03 09:09:49 -0800 (Thu, 03 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[TextureMapper] Use RGBA format for textures attached to framebuffers
https://bugs.webkit.org/show_bug.cgi?id=154965

Patch by Miguel Gomez &lt;magomez@igalia.com&gt; on 2016-03-03
Reviewed by Žan Doberšek.

Use RGBA format when allocating textures that will be used as framebuffer
attachments. This means adding a new flag to BitmapTexture and modifying
BitmapTextureGL to use the appropriate format according to the flag. Also,
BitmapTexturePool needs to use two vectors to handle both types of textures
separately, as we want to avoid constantly switching the format of a reused
texture.

No new tests since the behavior change is covered by existing tests.

* platform/graphics/texmap/BitmapTexture.h: Add new flag.
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::BitmapTextureGL): Receive flags on constructor and use RGBA
when the FBOAttachment flag is enabled.
(WebCore::BitmapTextureGL::applyFilters): Use FBOAttachemt flag to request a texture.
* platform/graphics/texmap/BitmapTextureGL.h: Add flags to the constructor.
* platform/graphics/texmap/BitmapTexturePool.cpp: Add a new vector of textures to hold
those in RGBA format.
(WebCore::BitmapTexturePool::acquireTexture): Return a texture for the usage specified
in the incoming flags.
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): Release textures from
both vectors.
(WebCore::BitmapTexturePool::createTexture): Pass the usage flag when creating a new
texture.
* platform/graphics/texmap/BitmapTexturePool.h: Add new texture vector and add flags to
the needed headers.
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool): Pass the received flags to the BitmapTexturePool.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface): Use FBOAttachemt flag to request a texture.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapBitmapTextureh">trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapBitmapTextureGLcpp">trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapBitmapTextureGLh">trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapBitmapTexturePoolcpp">trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapBitmapTexturePoolh">trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMappercpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperLayercpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/ChangeLog        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-03-03  Miguel Gomez  &lt;magomez@igalia.com&gt;
+
+        [TextureMapper] Use RGBA format for textures attached to framebuffers
+        https://bugs.webkit.org/show_bug.cgi?id=154965
+
+        Reviewed by Žan Doberšek.
+
+        Use RGBA format when allocating textures that will be used as framebuffer
+        attachments. This means adding a new flag to BitmapTexture and modifying
+        BitmapTextureGL to use the appropriate format according to the flag. Also,
+        BitmapTexturePool needs to use two vectors to handle both types of textures
+        separately, as we want to avoid constantly switching the format of a reused
+        texture.
+
+        No new tests since the behavior change is covered by existing tests.
+
+        * platform/graphics/texmap/BitmapTexture.h: Add new flag.
+        * platform/graphics/texmap/BitmapTextureGL.cpp:
+        (WebCore::BitmapTextureGL::BitmapTextureGL): Receive flags on constructor and use RGBA
+        when the FBOAttachment flag is enabled.
+        (WebCore::BitmapTextureGL::applyFilters): Use FBOAttachemt flag to request a texture.
+        * platform/graphics/texmap/BitmapTextureGL.h: Add flags to the constructor.
+        * platform/graphics/texmap/BitmapTexturePool.cpp: Add a new vector of textures to hold
+        those in RGBA format.
+        (WebCore::BitmapTexturePool::acquireTexture): Return a texture for the usage specified
+        in the incoming flags.
+        (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): Release textures from
+        both vectors.
+        (WebCore::BitmapTexturePool::createTexture): Pass the usage flag when creating a new
+        texture.
+        * platform/graphics/texmap/BitmapTexturePool.h: Add new texture vector and add flags to
+        the needed headers.
+        * platform/graphics/texmap/TextureMapper.cpp:
+        (WebCore::TextureMapper::acquireTextureFromPool): Pass the received flags to the BitmapTexturePool.
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::paintIntoSurface): Use FBOAttachemt flag to request a texture.
+
</ins><span class="cx"> 2016-03-03  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Box Alignment] New CSS Value 'normal' for Content Alignment
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapBitmapTextureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexture.h        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -45,7 +45,8 @@
</span><span class="cx"> public:
</span><span class="cx">     enum Flag {
</span><span class="cx">         NoFlag = 0,
</span><del>-        SupportsAlpha = 0x01
</del><ins>+        SupportsAlpha = 0x01,
+        FBOAttachment = 0x02
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     enum UpdateContentsFlag {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapBitmapTextureGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     return static_cast&lt;BitmapTextureGL*&gt;(texture);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BitmapTextureGL::BitmapTextureGL(PassRefPtr&lt;GraphicsContext3D&gt; context3D)
</del><ins>+BitmapTextureGL::BitmapTextureGL(PassRefPtr&lt;GraphicsContext3D&gt; context3D, const Flags flags)
</ins><span class="cx">     : m_id(0)
</span><span class="cx">     , m_fbo(0)
</span><span class="cx">     , m_rbo(0)
</span><span class="lines">@@ -71,15 +71,19 @@
</span><span class="cx">     , m_type(GraphicsContext3D::UNSIGNED_BYTE)
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><del>-    // If GL_EXT_texture_format_BGRA8888 is supported in the OpenGLES
-    // internal and external formats need to be BGRA
-    m_internalFormat = GraphicsContext3D::RGBA;
-    m_format = GraphicsContext3D::BGRA;
-    if (m_context3D-&gt;isGLES2Compliant()) {
-        if (m_context3D-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_texture_format_BGRA8888&quot;))
-            m_internalFormat = GraphicsContext3D::BGRA;
-        else
-            m_format = GraphicsContext3D::RGBA;
</del><ins>+    if (flags &amp; FBOAttachment)
+        m_internalFormat = m_format = GraphicsContext3D::RGBA;
+    else {
+        // If GL_EXT_texture_format_BGRA8888 is supported in the OpenGLES
+        // internal and external formats need to be BGRA
+        m_internalFormat = GraphicsContext3D::RGBA;
+        m_format = GraphicsContext3D::BGRA;
+        if (m_context3D-&gt;isGLES2Compliant()) {
+            if (m_context3D-&gt;getExtensions()-&gt;supports(&quot;GL_EXT_texture_format_BGRA8888&quot;))
+                m_internalFormat = GraphicsContext3D::BGRA;
+            else
+                m_format = GraphicsContext3D::RGBA;
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -243,7 +247,7 @@
</span><span class="cx">             bool last = (i == filters.size() - 1) &amp;&amp; (j == numPasses - 1);
</span><span class="cx">             if (!last) {
</span><span class="cx">                 if (!intermediateSurface)
</span><del>-                    intermediateSurface = texmapGL.acquireTextureFromPool(contentSize());
</del><ins>+                    intermediateSurface = texmapGL.acquireTextureFromPool(contentSize(), BitmapTexture::SupportsAlpha | BitmapTexture::FBOAttachment);
</ins><span class="cx">                 texmapGL.bindSurface(intermediateSurface.get());
</span><span class="cx">             }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapBitmapTextureGLh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> class BitmapTextureGL : public BitmapTexture {
</span><span class="cx"> public:
</span><del>-    BitmapTextureGL(PassRefPtr&lt;GraphicsContext3D&gt;);
</del><ins>+    BitmapTextureGL(PassRefPtr&lt;GraphicsContext3D&gt;, const Flags = NoFlag);
</ins><span class="cx">     virtual ~BitmapTextureGL();
</span><span class="cx"> 
</span><span class="cx">     virtual IntSize size() const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapBitmapTexturePoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -44,14 +44,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-RefPtr&lt;BitmapTexture&gt; BitmapTexturePool::acquireTexture(const IntSize&amp; size)
</del><ins>+RefPtr&lt;BitmapTexture&gt; BitmapTexturePool::acquireTexture(const IntSize&amp; size, const BitmapTexture::Flags flags)
</ins><span class="cx"> {
</span><del>-    Entry* selectedEntry = std::find_if(m_textures.begin(), m_textures.end(),
</del><ins>+    Vector&lt;Entry&gt;&amp; list = flags &amp; BitmapTexture::FBOAttachment ? m_attachmentTextures : m_textures;
+
+    Entry* selectedEntry = std::find_if(list.begin(), list.end(),
</ins><span class="cx">         [&amp;size](Entry&amp; entry) { return entry.m_texture-&gt;refCount() == 1 &amp;&amp; entry.m_texture-&gt;size() == size; });
</span><span class="cx"> 
</span><del>-    if (selectedEntry == m_textures.end()) {
-        m_textures.append(Entry(createTexture()));
-        selectedEntry = &amp;m_textures.last();
</del><ins>+    if (selectedEntry == list.end()) {
+        list.append(Entry(createTexture(flags)));
+        selectedEntry = &amp;list.last();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     scheduleReleaseUnusedTextures();
</span><span class="lines">@@ -69,29 +71,41 @@
</span><span class="cx"> 
</span><span class="cx"> void BitmapTexturePool::releaseUnusedTexturesTimerFired()
</span><span class="cx"> {
</span><del>-    if (m_textures.isEmpty())
-        return;
-
</del><span class="cx">     // Delete entries, which have been unused in s_releaseUnusedSecondsTolerance.
</span><del>-    std::sort(m_textures.begin(), m_textures.end(),
-        [](const Entry&amp; a, const Entry&amp; b) { return a.m_lastUsedTime &gt; b.m_lastUsedTime; });
</del><ins>+    double minUsedTime = monotonicallyIncreasingTime() - s_releaseUnusedSecondsTolerance;
</ins><span class="cx"> 
</span><del>-    double minUsedTime = monotonicallyIncreasingTime() - s_releaseUnusedSecondsTolerance;
-    for (size_t i = 0; i &lt; m_textures.size(); ++i) {
-        if (m_textures[i].m_lastUsedTime &lt; minUsedTime) {
-            m_textures.remove(i, m_textures.size() - i);
-            break;
</del><ins>+    if (!m_textures.isEmpty()) {
+        std::sort(m_textures.begin(), m_textures.end(),
+            [](const Entry&amp; a, const Entry&amp; b) { return a.m_lastUsedTime &gt; b.m_lastUsedTime; });
+
+        for (size_t i = 0; i &lt; m_textures.size(); ++i) {
+            if (m_textures[i].m_lastUsedTime &lt; minUsedTime) {
+                m_textures.remove(i, m_textures.size() - i);
+                break;
+            }
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!m_textures.isEmpty())
</del><ins>+    if (!m_attachmentTextures.isEmpty()) {
+        std::sort(m_attachmentTextures.begin(), m_attachmentTextures.end(),
+            [](const Entry&amp; a, const Entry&amp; b) { return a.m_lastUsedTime &gt; b.m_lastUsedTime; });
+
+        for (size_t i = 0; i &lt; m_attachmentTextures.size(); ++i) {
+            if (m_attachmentTextures[i].m_lastUsedTime &lt; minUsedTime) {
+                m_attachmentTextures.remove(i, m_textures.size() - i);
+                break;
+            }
+        }
+    }
+
+    if (!m_textures.isEmpty() || !m_attachmentTextures.isEmpty())
</ins><span class="cx">         scheduleReleaseUnusedTextures();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;BitmapTexture&gt; BitmapTexturePool::createTexture()
</del><ins>+RefPtr&lt;BitmapTexture&gt; BitmapTexturePool::createTexture(const BitmapTexture::Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> #if USE(TEXTURE_MAPPER_GL)
</span><del>-    return adoptRef(new BitmapTextureGL(m_context3D));
</del><ins>+    return adoptRef(new BitmapTextureGL(m_context3D, flags));
</ins><span class="cx"> #else
</span><span class="cx">     return nullptr;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapBitmapTexturePoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">     explicit BitmapTexturePool(RefPtr&lt;GraphicsContext3D&gt;&amp;&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RefPtr&lt;BitmapTexture&gt; acquireTexture(const IntSize&amp;);
</del><ins>+    RefPtr&lt;BitmapTexture&gt; acquireTexture(const IntSize&amp;, const BitmapTexture::Flags);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     struct Entry {
</span><span class="lines">@@ -64,13 +64,14 @@
</span><span class="cx"> 
</span><span class="cx">     void scheduleReleaseUnusedTextures();
</span><span class="cx">     void releaseUnusedTexturesTimerFired();
</span><del>-    RefPtr&lt;BitmapTexture&gt; createTexture();
</del><ins>+    RefPtr&lt;BitmapTexture&gt; createTexture(const BitmapTexture::Flags);
</ins><span class="cx"> 
</span><span class="cx"> #if USE(TEXTURE_MAPPER_GL)
</span><span class="cx">     RefPtr&lt;GraphicsContext3D&gt; m_context3D;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;Entry&gt; m_textures;
</span><ins>+    Vector&lt;Entry&gt; m_attachmentTextures;
</ins><span class="cx">     Timer m_releaseUnusedTexturesTimer;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapTextureMappercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;BitmapTexture&gt; TextureMapper::acquireTextureFromPool(const IntSize&amp; size, const BitmapTexture::Flags flags)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;BitmapTexture&gt; selectedTexture = m_texturePool-&gt;acquireTexture(size);
</del><ins>+    RefPtr&lt;BitmapTexture&gt; selectedTexture = m_texturePool-&gt;acquireTexture(size, flags);
</ins><span class="cx">     selectedTexture-&gt;reset(size, flags);
</span><span class="cx">     return selectedTexture.release();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapTextureMapperLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (197505 => 197506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp        2016-03-03 16:40:19 UTC (rev 197505)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp        2016-03-03 17:09:49 UTC (rev 197506)
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;BitmapTexture&gt; TextureMapperLayer::paintIntoSurface(const TextureMapperPaintOptions&amp; options, const IntSize&amp; size)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;BitmapTexture&gt; surface = options.textureMapper.acquireTextureFromPool(size);
</del><ins>+    RefPtr&lt;BitmapTexture&gt; surface = options.textureMapper.acquireTextureFromPool(size, BitmapTexture::SupportsAlpha | BitmapTexture::FBOAttachment);
</ins><span class="cx">     TextureMapperPaintOptions paintOptions(options);
</span><span class="cx">     paintOptions.surface = surface;
</span><span class="cx">     options.textureMapper.bindSurface(surface.get());
</span></span></pre>
</div>
</div>

</body>
</html>