| Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.cpp
|
| deleted file mode 100644
|
| index 5f3cba39285d0e6b081c86487fe0a6c9dc150c9e..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.cpp
|
| +++ /dev/null
|
| @@ -1,49 +0,0 @@
|
| -// Copyright 2017 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 "platform/graphics/paint/GeometryMapperTransformCache.h"
|
| -
|
| -namespace blink {
|
| -
|
| -// All transform caches invalidate themselves by tracking a local cache
|
| -// generation, and invalidating their cache if their cache generation disagrees
|
| -// with s_transformCacheGeneration.
|
| -static unsigned s_transformCacheGeneration = 0;
|
| -
|
| -void GeometryMapperTransformCache::clearCache() {
|
| - s_transformCacheGeneration++;
|
| -}
|
| -
|
| -void GeometryMapperTransformCache::invalidateCacheIfNeeded() {
|
| - if (m_cacheGeneration != s_transformCacheGeneration) {
|
| - m_transformCache.clear();
|
| - m_cacheGeneration = s_transformCacheGeneration;
|
| - }
|
| -}
|
| -
|
| -const TransformationMatrix* GeometryMapperTransformCache::getCachedTransform(
|
| - const TransformPaintPropertyNode* ancestorTransform) {
|
| - invalidateCacheIfNeeded();
|
| - for (const auto& entry : m_transformCache) {
|
| - if (entry.ancestorNode == ancestorTransform) {
|
| - return &entry.toAncestor;
|
| - }
|
| - }
|
| - return nullptr;
|
| -}
|
| -
|
| -void GeometryMapperTransformCache::setCachedTransform(
|
| - const TransformPaintPropertyNode* ancestorTransform,
|
| - const TransformationMatrix& matrix) {
|
| - invalidateCacheIfNeeded();
|
| -#if DCHECK_IS_ON()
|
| - for (const auto& entry : m_transformCache) {
|
| - if (entry.ancestorNode == ancestorTransform)
|
| - DCHECK(false); // There should be no existing entry.
|
| - }
|
| -#endif
|
| - m_transformCache.push_back(TransformCacheEntry(ancestorTransform, matrix));
|
| -}
|
| -
|
| -} // namespace blink
|
|
|