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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 342483007: Removed ManagedMemoryStats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 context_provider->ContextGL()->Flush(); 139 context_provider->ContextGL()->Flush();
140 } 140 }
141 } 141 }
142 // We loop visibility to the GPU process, since that's what manages memory. 142 // We loop visibility to the GPU process, since that's what manages memory.
143 // That will allow it to feed us with memory allocations that we can act 143 // That will allow it to feed us with memory allocations that we can act
144 // upon. 144 // upon.
145 if (context_provider) 145 if (context_provider)
146 context_provider->ContextSupport()->SetSurfaceVisible(visible()); 146 context_provider->ContextSupport()->SetSurfaceVisible(visible());
147 } 147 }
148 148
149 void DelegatingRenderer::SendManagedMemoryStats(size_t bytes_visible,
150 size_t bytes_visible_and_nearby,
151 size_t bytes_allocated) {
152 ContextProvider* context_provider = output_surface_->context_provider();
153 if (!context_provider) {
154 // In the software path each child process manages its memory separately,
155 // so memory stats don't have to be sent anywhere.
156 return;
157 }
158 gpu::ManagedMemoryStats stats;
159 stats.bytes_required = bytes_visible;
160 stats.bytes_nice_to_have = bytes_visible_and_nearby;
161 stats.bytes_allocated = bytes_allocated;
162 stats.backbuffer_requested = false;
163
164 context_provider->ContextSupport()->SendManagedMemoryStats(stats);
165 }
166
167 } // namespace cc 149 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698