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

Unified Diff: webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc

Issue 1016733002: cc: Free gpu resources when we are invisible or TM is oom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed. Created 5 years, 9 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
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc
diff --git a/webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc b/webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc
index db313a1710a775669e26635da96ad6a2324ce0c7..a5489a2fb077a0e2e857dc3a88358be9b9aceac3 100644
--- a/webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc
+++ b/webkit/common/gpu/grcontext_for_webgraphicscontext3d.cc
@@ -59,17 +59,6 @@ GrContextForWebGraphicsContext3D::GrContextForWebGraphicsContext3D(
gr_context_ = skia::AdoptRef(GrContext::Create(
kOpenGL_GrBackend,
reinterpret_cast<GrBackendContext>(interface.get())));
- if (gr_context_) {
- // The limit of the number of GPU resources we hold in the GrContext's
- // GPU cache.
- static const int kMaxGaneshResourceCacheCount = 2048;
- // The limit of the bytes allocated toward GPU resources in the GrContext's
- // GPU cache.
- static const size_t kMaxGaneshResourceCacheBytes = 96 * 1024 * 1024;
-
- gr_context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount,
- kMaxGaneshResourceCacheBytes);
vmiura 2015/04/02 19:12:34 I'm not sure it's OK to remove this initialization
sohanjg 2015/04/08 09:00:31 Acknowledged. Added it back.
- }
}
GrContextForWebGraphicsContext3D::~GrContextForWebGraphicsContext3D() {
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698