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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 263553009: content: Cleanup GpuMemoryBuffer allocation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac build fix 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 | « content/common/gpu/client/gpu_memory_buffer_impl_win.cc ('k') | 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/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1157
1158 // Allow calling this from the compositor thread. 1158 // Allow calling this from the compositor thread.
1159 if (base::MessageLoop::current() == message_loop()) 1159 if (base::MessageLoop::current() == message_loop())
1160 success = ChildThread::Send(message); 1160 success = ChildThread::Send(message);
1161 else 1161 else
1162 success = sync_message_filter()->Send(message); 1162 success = sync_message_filter()->Send(message);
1163 1163
1164 if (!success) 1164 if (!success)
1165 return scoped_ptr<gfx::GpuMemoryBuffer>(); 1165 return scoped_ptr<gfx::GpuMemoryBuffer>();
1166 1166
1167 return GpuMemoryBufferImpl::Create( 1167 return GpuMemoryBufferImpl::CreateFromHandle(
1168 handle, gfx::Size(width, height), internalformat) 1168 handle, gfx::Size(width, height), internalformat)
1169 .PassAs<gfx::GpuMemoryBuffer>(); 1169 .PassAs<gfx::GpuMemoryBuffer>();
1170 } 1170 }
1171 1171
1172 void RenderThreadImpl::AcceptConnection( 1172 void RenderThreadImpl::AcceptConnection(
1173 const mojo::String& service_name, 1173 const mojo::String& service_name,
1174 mojo::ScopedMessagePipeHandle message_pipe) { 1174 mojo::ScopedMessagePipeHandle message_pipe) {
1175 // TODO(darin): Invent some kind of registration system to use here. 1175 // TODO(darin): Invent some kind of registration system to use here.
1176 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) { 1176 if (service_name.To<base::StringPiece>() == kRendererService_WebUISetup) {
1177 WebUISetupImpl::Bind(message_pipe.Pass()); 1177 WebUISetupImpl::Bind(message_pipe.Pass());
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 hidden_widget_count_--; 1497 hidden_widget_count_--;
1498 1498
1499 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1499 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1500 return; 1500 return;
1501 } 1501 }
1502 1502
1503 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1503 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1504 } 1504 }
1505 1505
1506 } // namespace content 1506 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698