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

Unified Diff: third_party/WebKit/Source/platform/graphics/Pattern.cpp

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/platform/graphics/Pattern.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Pattern.cpp b/third_party/WebKit/Source/platform/graphics/Pattern.cpp
index ce773d59b50118c1770aa8b67cf971dfbafa1aa7..e9f2ca1f9f4a3055958249459f11c8babbc9960d 100644
--- a/third_party/WebKit/Source/platform/graphics/Pattern.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Pattern.cpp
@@ -47,16 +47,13 @@ PassRefPtr<Pattern> Pattern::createPicturePattern(PassRefPtr<const SkPicture> pi
return PicturePattern::create(picture, repeatMode);
}
-Pattern::Pattern(RepeatMode repeatMode, int64_t externalMemoryAllocated)
+Pattern::Pattern(RepeatMode repeatMode)
: m_repeatMode(repeatMode)
- , m_externalMemoryAllocated(0)
{
- adjustExternalMemoryAllocated(externalMemoryAllocated);
}
Pattern::~Pattern()
{
- adjustExternalMemoryAllocated(-m_externalMemoryAllocated);
}
void Pattern::applyToPaint(SkPaint& paint)
@@ -77,13 +74,4 @@ void Pattern::setPatternSpaceTransform(const AffineTransform& patternSpaceTransf
m_pattern.clear();
}
-void Pattern::adjustExternalMemoryAllocated(int64_t delta)
-{
- delta = std::max(-m_externalMemoryAllocated, delta);
-
- v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(delta);
-
- m_externalMemoryAllocated += delta;
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698