Title: [101864] trunk/Source/WebCore
Revision
101864
Author
[email protected]
Date
2011-12-02 15:03:06 -0800 (Fri, 02 Dec 2011)

Log Message

[chromium] Eliminate unnecessary state on previous CL
https://bugs.webkit.org/show_bug.cgi?id=73661

Patch by Jonathan Backer <[email protected]> on 2011-12-02
Reviewed by Kenneth Russell.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101863 => 101864)


--- trunk/Source/WebCore/ChangeLog	2011-12-02 23:02:58 UTC (rev 101863)
+++ trunk/Source/WebCore/ChangeLog	2011-12-02 23:03:06 UTC (rev 101864)
@@ -1,3 +1,19 @@
+2011-12-02  Jonathan Backer  <[email protected]>
+
+        [chromium] Eliminate unnecessary state on previous CL
+        https://bugs.webkit.org/show_bug.cgi?id=73661
+
+        Reviewed by Kenneth Russell.
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::initialize):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+        (WebCore::CCLayerTreeHost::initialize):
+        (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+        (WebCore::CCSettings::CCSettings):
+        (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
+
 2011-12-02  Dan Bernstein  <[email protected]>
 
         <rdar://problem/10520670> REGRESSION (r91738): didFinishLoad is called before custom fonts have finished loading

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (101863 => 101864)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-12-02 23:02:58 UTC (rev 101863)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-12-02 23:03:06 UTC (rev 101864)
@@ -187,8 +187,8 @@
         m_capabilities.usingAcceleratedPainting = true;
 
     WebCore::Extensions3D* extensions = m_context->getExtensions();
-    m_capabilities.usingFrontBufferCached = extensions->supports("GL_CHROMIUM_front_buffer_cached");
-    if (m_capabilities.usingFrontBufferCached)
+    m_capabilities.contextHasCachedFrontBuffer = extensions->supports("GL_CHROMIUM_front_buffer_cached");
+    if (m_capabilities.contextHasCachedFrontBuffer)
         extensions->ensureEnabled("GL_CHROMIUM_front_buffer_cached");
 
     m_capabilities.usingPostSubBuffer = extensions->supports("GL_CHROMIUM_post_sub_buffer");

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (101863 => 101864)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-12-02 23:02:58 UTC (rev 101863)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-12-02 23:03:06 UTC (rev 101864)
@@ -92,7 +92,6 @@
 
     // Update m_settings based on capabilities that we got back from the renderer.
     m_settings.acceleratePainting = m_proxy->layerRendererCapabilities().usingAcceleratedPainting;
-    m_settings.discardAllTextures = m_proxy->layerRendererCapabilities().usingFrontBufferCached;
 
     m_contentsTextureManager = TextureManager::create(TextureManager::highLimitBytes(), m_proxy->layerRendererCapabilities().maxTextureSize);
     return true;
@@ -277,7 +276,7 @@
 void CCLayerTreeHost::didBecomeInvisibleOnImplThread(CCLayerTreeHostImpl* hostImpl)
 {
     ASSERT(CCProxy::isImplThread());
-    if (m_settings.discardAllTextures)
+    if (m_proxy->layerRendererCapabilities().contextHasCachedFrontBuffer)
         contentsTextureManager()->evictAndDeleteAllTextures(hostImpl->contentsTextureAllocator());
     else {
         contentsTextureManager()->reduceMemoryToLimit(TextureManager::reclaimLimitBytes());

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (101863 => 101864)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-12-02 23:02:58 UTC (rev 101863)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-12-02 23:03:06 UTC (rev 101864)
@@ -71,7 +71,6 @@
     CCSettings()
             : acceleratePainting(false)
             , compositeOffscreen(false)
-            , discardAllTextures(false)
             , showFPSCounter(false)
             , showPlatformLayerTree(false)
             , useDamageTracker(false)
@@ -79,7 +78,6 @@
 
     bool acceleratePainting;
     bool compositeOffscreen;
-    bool discardAllTextures;
     bool showFPSCounter;
     bool showPlatformLayerTree;
     bool useDamageTracker;
@@ -90,7 +88,7 @@
 struct LayerRendererCapabilities {
     LayerRendererCapabilities()
         : bestTextureFormat(0)
-        , usingFrontBufferCached(false)
+        , contextHasCachedFrontBuffer(false)
         , usingPostSubBuffer(false)
         , usingMapSub(false)
         , usingAcceleratedPainting(false)
@@ -99,7 +97,7 @@
         , maxTextureSize(0) { }
 
     GC3Denum bestTextureFormat;
-    bool usingFrontBufferCached;
+    bool contextHasCachedFrontBuffer;
     bool usingPostSubBuffer;
     bool usingMapSub;
     bool usingAcceleratedPainting;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to