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

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

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move max_transfer_buffer_usage_bytes to OutputSurface::Capabilities Created 7 years, 3 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return new IPC::ForwardingMessageFilter( 43 return new IPC::ForwardingMessageFilter(
44 messages_to_filter, arraysize(messages_to_filter), 44 messages_to_filter, arraysize(messages_to_filter),
45 target_task_runner); 45 target_task_runner);
46 } 46 }
47 47
48 CompositorOutputSurface::CompositorOutputSurface( 48 CompositorOutputSurface::CompositorOutputSurface(
49 int32 routing_id, 49 int32 routing_id,
50 uint32 output_surface_id, 50 uint32 output_surface_id,
51 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, 51 const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
52 scoped_ptr<cc::SoftwareOutputDevice> software_device, 52 scoped_ptr<cc::SoftwareOutputDevice> software_device,
53 bool use_swap_compositor_frame_message) 53 bool use_swap_compositor_frame_message,
54 : OutputSurface(context_provider, software_device.Pass()), 54 size_t max_transfer_buffer_usage_bytes)
55 : OutputSurface(context_provider,
56 software_device.Pass(),
57 max_transfer_buffer_usage_bytes),
55 output_surface_id_(output_surface_id), 58 output_surface_id_(output_surface_id),
56 use_swap_compositor_frame_message_(use_swap_compositor_frame_message), 59 use_swap_compositor_frame_message_(use_swap_compositor_frame_message),
57 output_surface_filter_( 60 output_surface_filter_(
58 RenderThreadImpl::current()->compositor_output_surface_filter()), 61 RenderThreadImpl::current()->compositor_output_surface_filter()),
59 routing_id_(routing_id), 62 routing_id_(routing_id),
60 prefers_smoothness_(false), 63 prefers_smoothness_(false),
61 #if defined(OS_WIN) 64 #if defined(OS_WIN)
62 // TODO(epenner): Implement PlatformThread::CurrentHandle() on windows. 65 // TODO(epenner): Implement PlatformThread::CurrentHandle() on windows.
63 main_thread_handle_(base::PlatformThreadHandle()) 66 main_thread_handle_(base::PlatformThreadHandle())
64 #else 67 #else
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // If this is the last surface to stop preferring smoothness, 219 // If this is the last surface to stop preferring smoothness,
217 // Reset the main thread's priority to the default. 220 // Reset the main thread's priority to the default.
218 if (prefers_smoothness_ == true && 221 if (prefers_smoothness_ == true &&
219 --g_prefer_smoothness_count == 0) { 222 --g_prefer_smoothness_count == 0) {
220 SetThreadPriorityToDefault(main_thread_handle_); 223 SetThreadPriorityToDefault(main_thread_handle_);
221 } 224 }
222 prefers_smoothness_ = prefers_smoothness; 225 prefers_smoothness_ = prefers_smoothness;
223 } 226 }
224 227
225 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698