Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2088)

Unified Diff: Source/platform/graphics/paint/SubtreeRecorder.cpp

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/paint/SubtreeRecorder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/SubtreeRecorder.cpp
diff --git a/Source/platform/graphics/paint/SubtreeRecorder.cpp b/Source/platform/graphics/paint/SubtreeRecorder.cpp
deleted file mode 100644
index 5cc1e8caf64f7784318d66d3480247c9ab8fd53c..0000000000000000000000000000000000000000
--- a/Source/platform/graphics/paint/SubtreeRecorder.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "platform/graphics/paint/SubtreeRecorder.h"
-
-#include "platform/RuntimeEnabledFeatures.h"
-#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/CachedDisplayItem.h"
-#include "platform/graphics/paint/DisplayItemList.h"
-#include "platform/graphics/paint/SubtreeDisplayItem.h"
-
-namespace blink {
-
-SubtreeRecorder::SubtreeRecorder(GraphicsContext& context, const DisplayItemClientWrapper& client, int paintPhase)
- : m_displayItemList(context.displayItemList())
- , m_client(client)
- , m_paintPhase(paintPhase)
- , m_canUseCache(false)
-#if ENABLE(ASSERT)
- , m_checkedCanUseCache(false)
-#endif
-{
- if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- return;
-
- ASSERT(m_displayItemList);
-
- // TODO(wangxianzhu): Implement subtree caching.
-
- if (!m_canUseCache)
- m_displayItemList->createAndAppend<BeginSubtreeDisplayItem>(m_client, DisplayItem::paintPhaseToBeginSubtreeType(paintPhase));
-}
-
-SubtreeRecorder::~SubtreeRecorder()
-{
- if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- return;
-
- ASSERT(m_checkedCanUseCache);
- if (m_canUseCache)
- m_displayItemList->createAndAppend<CachedDisplayItem>(m_client, DisplayItem::paintPhaseToCachedSubtreeType(m_paintPhase));
- else if (m_displayItemList->lastDisplayItemIsNoopBegin())
- m_displayItemList->removeLastDisplayItem();
- else
- m_displayItemList->createAndAppend<EndSubtreeDisplayItem>(m_client, DisplayItem::paintPhaseToEndSubtreeType(m_paintPhase));
-}
-
-bool SubtreeRecorder::canUseCache() const
-{
-#if ENABLE(ASSERT)
- m_checkedCanUseCache = true;
-#endif
- return m_canUseCache;
-}
-
-} // namespace blink
« no previous file with comments | « Source/platform/graphics/paint/SubtreeRecorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698