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

Side by Side Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 288343007: Increase software compositor memory limit to 128MB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/renderer/gpu/compositor_output_surface.h" 5 #include "content/renderer/gpu/compositor_output_surface.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 output_surface_proxy_ = new CompositorOutputSurfaceProxy(this); 99 output_surface_proxy_ = new CompositorOutputSurfaceProxy(this);
100 output_surface_filter_->AddRoute( 100 output_surface_filter_->AddRoute(
101 routing_id_, 101 routing_id_,
102 base::Bind(&CompositorOutputSurfaceProxy::OnMessageReceived, 102 base::Bind(&CompositorOutputSurfaceProxy::OnMessageReceived,
103 output_surface_proxy_)); 103 output_surface_proxy_));
104 104
105 if (!context_provider()) { 105 if (!context_provider()) {
106 // Without a GPU context, the memory policy otherwise wouldn't be set. 106 // Without a GPU context, the memory policy otherwise wouldn't be set.
107 client->SetMemoryPolicy(cc::ManagedMemoryPolicy( 107 client->SetMemoryPolicy(cc::ManagedMemoryPolicy(
108 64 * 1024 * 1024, 108 128 * 1024 * 1024,
109 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 109 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
110 cc::ManagedMemoryPolicy::kDefaultNumResourcesLimit)); 110 cc::ManagedMemoryPolicy::kDefaultNumResourcesLimit));
111 } 111 }
112 112
113 return true; 113 return true;
114 } 114 }
115 115
116 void CompositorOutputSurface::ShortcutSwapAck( 116 void CompositorOutputSurface::ShortcutSwapAck(
117 uint32 output_surface_id, 117 uint32 output_surface_id,
118 scoped_ptr<cc::GLFrameData> gl_frame_data, 118 scoped_ptr<cc::GLFrameData> gl_frame_data,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // If this is the last surface to stop preferring smoothness, 275 // If this is the last surface to stop preferring smoothness,
276 // Reset the main thread's priority to the default. 276 // Reset the main thread's priority to the default.
277 if (prefers_smoothness_ == true && 277 if (prefers_smoothness_ == true &&
278 --g_prefer_smoothness_count == 0) { 278 --g_prefer_smoothness_count == 0) {
279 SetThreadPriorityToDefault(main_thread_handle_); 279 SetThreadPriorityToDefault(main_thread_handle_);
280 } 280 }
281 prefers_smoothness_ = prefers_smoothness; 281 prefers_smoothness_ = prefers_smoothness;
282 } 282 }
283 283
284 } // namespace content 284 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698