Title: [112075] trunk/Source/WebCore
Revision
112075
Author
[email protected]
Date
2012-03-26 04:17:40 -0700 (Mon, 26 Mar 2012)

Log Message

[Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
https://bugs.webkit.org/show_bug.cgi?id=82178

If TextureMapperShaderManager already has a reference to an instance of the
requested shader program type, this instance should be reused instead of
creating a new one.

Reviewed by Noam Rosenthal.

* platform/graphics/texmap/TextureMapperShaderManager.h:
(WebCore::TextureMapperShaderManager::getShaderProgram):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112074 => 112075)


--- trunk/Source/WebCore/ChangeLog	2012-03-26 11:00:28 UTC (rev 112074)
+++ trunk/Source/WebCore/ChangeLog	2012-03-26 11:17:40 UTC (rev 112075)
@@ -1,3 +1,17 @@
+2012-03-26  Zeno Albisser  <[email protected]>
+
+        [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
+        https://bugs.webkit.org/show_bug.cgi?id=82178
+
+        If TextureMapperShaderManager already has a reference to an instance of the
+        requested shader program type, this instance should be reused instead of
+        creating a new one.
+
+        Reviewed by Noam Rosenthal.
+
+        * platform/graphics/texmap/TextureMapperShaderManager.h:
+        (WebCore::TextureMapperShaderManager::getShaderProgram):
+
 2012-03-26  Yury Semikhatsky  <[email protected]>
 
         [Chromium] Web Inspector: dedicated worker inspector is empty

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h (112074 => 112075)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h	2012-03-26 11:00:28 UTC (rev 112074)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h	2012-03-26 11:17:40 UTC (rev 112075)
@@ -107,6 +107,10 @@
         if (shaderType == Invalid)
             return program;
 
+        TextureMapperShaderProgramMap::iterator it = m_textureMapperShaderProgramMap.find(shaderType);
+        if (it != m_textureMapperShaderProgramMap.end())
+            return it->second;
+
         switch (shaderType) {
         case Simple:
             program = TextureMapperShaderProgramSimple::create();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to