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

Unified Diff: cc/gl_renderer.cc

Issue 11637022: Send memory management policies to the tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index e9f8254a16b5629a6033aeb278a040d58821218d..6bb03f6a6bcc1c9a3615f854f389e72d272ba609 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -1345,20 +1345,20 @@ void GLRenderer::onMemoryAllocationChanged(WebGraphicsMemoryAllocation allocatio
m_discardBackbufferWhenNotVisible = oldDiscardBackbufferWhenNotVisible;
}
-int GLRenderer::priorityCutoffValue(WebKit::WebGraphicsMemoryAllocation::PriorityCutoff priorityCutoff)
+ManagedMemoryPolicy::PriorityCutoff GLRenderer::priorityCutoffValue(WebKit::WebGraphicsMemoryAllocation::PriorityCutoff priorityCutoff)
{
switch (priorityCutoff) {
case WebKit::WebGraphicsMemoryAllocation::PriorityCutoffAllowNothing:
- return PriorityCalculator::allowNothingCutoff();
+ return ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING;
case WebKit::WebGraphicsMemoryAllocation::PriorityCutoffAllowVisibleOnly:
- return PriorityCalculator::allowVisibleOnlyCutoff();
+ return ManagedMemoryPolicy::CUTOFF_ALLOW_REQUIRED_ONLY;
case WebKit::WebGraphicsMemoryAllocation::PriorityCutoffAllowVisibleAndNearby:
- return PriorityCalculator::allowVisibleAndNearbyCutoff();
+ return ManagedMemoryPolicy::CUTOFF_ALLOW_NICE_TO_HAVE;
case WebKit::WebGraphicsMemoryAllocation::PriorityCutoffAllowEverything:
- return PriorityCalculator::allowEverythingCutoff();
+ return ManagedMemoryPolicy::CUTOFF_ALLOW_EVERYTHING;
}
NOTREACHED();
- return 0;
+ return ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING;
}
void GLRenderer::enforceMemoryPolicy()

Powered by Google App Engine
This is Rietveld 408576698