[chromium] Make full texture updates explicit
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 04:42:12 +0000 (04:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jul 2012 04:42:12 +0000 (04:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90507

Patch by Brian Anderson <brianderson@chromium.org> on 2012-07-10
Reviewed by Adrienne Walker.

Covered by existing tests.

* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::updatePart):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateTiles):
* platform/graphics/chromium/cc/CCTextureUpdater.cpp:
(WebCore::CCTextureUpdater::appendFullUpdate):
(WebCore::CCTextureUpdater::hasMoreUpdates):
(WebCore::CCTextureUpdater::update):
(WebCore::CCTextureUpdater::clear):
* platform/graphics/chromium/cc/CCTextureUpdater.h:
(CCTextureUpdater):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/ScrollbarLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h

index 8d88d82..26584ef 100644 (file)
@@ -1,3 +1,24 @@
+2012-07-10  Brian Anderson  <brianderson@chromium.org>
+
+        [chromium] Make full texture updates explicit
+        https://bugs.webkit.org/show_bug.cgi?id=90507
+
+        Reviewed by Adrienne Walker.
+
+        Covered by existing tests.
+
+        * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
+        (WebCore::ScrollbarLayerChromium::updatePart):
+        * platform/graphics/chromium/TiledLayerChromium.cpp:
+        (WebCore::TiledLayerChromium::updateTiles):
+        * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
+        (WebCore::CCTextureUpdater::appendFullUpdate):
+        (WebCore::CCTextureUpdater::hasMoreUpdates):
+        (WebCore::CCTextureUpdater::update):
+        (WebCore::CCTextureUpdater::clear):
+        * platform/graphics/chromium/cc/CCTextureUpdater.h:
+        (CCTextureUpdater):
+
 2012-07-10  Shinya Kawanaka  <shinyak@chromium.org>
 
         Crash in nextLinePosition() due to accessing a removed root line box.
index 7580b63..56c96a7 100644 (file)
@@ -247,7 +247,7 @@ void ScrollbarLayerChromium::updatePart(LayerTextureUpdater* painter, LayerTextu
     texture->prepareRect(rect);
 
     IntRect destRect(IntPoint(), rect.size());
-    updater.appendUpdate(texture, rect, destRect);
+    updater.appendFullUpdate(texture, rect, destRect);
 }
 
 
index e653a2d..5c4bc05 100644 (file)
@@ -510,7 +510,7 @@ void TiledLayerChromium::updateTiles(bool idle, int left, int top, int right, in
             if (tile->partialUpdate)
                 updater.appendPartialUpdate(tile->texture(), sourceRect, destRect);
             else
-                updater.appendUpdate(tile->texture(), sourceRect, destRect);
+                updater.appendFullUpdate(tile->texture(), sourceRect, destRect);
         }
     }
 }
index e3c6ec8..3190d82 100644 (file)
@@ -59,9 +59,9 @@ void CCTextureUpdater::appendUpdate(LayerTextureUpdater::Texture* texture, const
     entries.append(entry);
 }
 
-void CCTextureUpdater::appendUpdate(LayerTextureUpdater::Texture* texture, const IntRect& sourceRect, const IntRect& destRect)
+void CCTextureUpdater::appendFullUpdate(LayerTextureUpdater::Texture* texture, const IntRect& sourceRect, const IntRect& destRect)
 {
-    appendUpdate(texture, sourceRect, destRect, m_entries);
+    appendUpdate(texture, sourceRect, destRect, m_fullEntries);
 }
 
 void CCTextureUpdater::appendPartialUpdate(LayerTextureUpdater::Texture* texture, const IntRect& sourceRect, const IntRect& destRect)
@@ -80,26 +80,26 @@ void CCTextureUpdater::appendCopy(unsigned sourceTexture, unsigned destTexture,
 
 bool CCTextureUpdater::hasMoreUpdates() const
 {
-    return m_entries.size() || m_partialEntries.size() || m_copyEntries.size();
+    return m_fullEntries.size() || m_partialEntries.size() || m_copyEntries.size();
 }
 
 void CCTextureUpdater::update(CCGraphicsContext* context, TextureAllocator* allocator, TextureCopier* copier, TextureUploader* uploader, size_t count)
 {
     size_t index;
 
-    if (m_entries.size() || m_partialEntries.size()) {
+    if (m_fullEntries.size() || m_partialEntries.size()) {
         if (uploader->isBusy())
             return;
 
         uploader->beginUploads();
 
-        size_t maxIndex = min(m_entryIndex + count, m_entries.size());
+        size_t maxIndex = min(m_entryIndex + count, m_fullEntries.size());
         for (index = m_entryIndex; index < maxIndex; ++index) {
-            UpdateEntry& entry = m_entries[index];
+            UpdateEntry& entry = m_fullEntries[index];
             uploader->uploadTexture(context, entry.texture, allocator, entry.sourceRect, entry.destRect);
         }
 
-        bool moreUploads = maxIndex < m_entries.size();
+        bool moreUploads = maxIndex < m_fullEntries.size();
 
         ASSERT(m_partialEntries.size() <= count);
         // We need another update batch if the number of updates remaining
@@ -143,7 +143,7 @@ void CCTextureUpdater::update(CCGraphicsContext* context, TextureAllocator* allo
 void CCTextureUpdater::clear()
 {
     m_entryIndex = 0;
-    m_entries.clear();
+    m_fullEntries.clear();
     m_partialEntries.clear();
     m_copyEntries.clear();
 }
index 0f139f3..8a43794 100644 (file)
@@ -41,7 +41,7 @@ public:
     CCTextureUpdater();
     ~CCTextureUpdater();
 
-    void appendUpdate(LayerTextureUpdater::Texture*, const IntRect& sourceRect, const IntRect& destRect);
+    void appendFullUpdate(LayerTextureUpdater::Texture*, const IntRect& sourceRect, const IntRect& destRect);
     void appendPartialUpdate(LayerTextureUpdater::Texture*, const IntRect& sourceRect, const IntRect& destRect);
     void appendCopy(unsigned sourceTexture, unsigned destTexture, const IntSize&);
 
@@ -68,7 +68,7 @@ private:
     static void appendUpdate(LayerTextureUpdater::Texture*, const IntRect& sourceRect, const IntRect& destRect, Vector<UpdateEntry>&);
 
     size_t m_entryIndex;
-    Vector<UpdateEntry> m_entries;
+    Vector<UpdateEntry> m_fullEntries;
     Vector<UpdateEntry> m_partialEntries;
     Vector<CopyEntry> m_copyEntries;
 };