summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_thread_impl.cc
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2014-12-10 16:49:37 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-11 00:50:57 +0000
commit9015c8b4419268a35a5c1a0f2afb7a2a2aaff699 (patch)
treef4ded328bf40fd016058f68be4b4b457bd1eb328 /content/renderer/render_thread_impl.cc
parentbcb3fdd69b3a04edf3f48e333ea42a8ec6f0177b (diff)
downloadchromium_src-9015c8b4419268a35a5c1a0f2afb7a2a2aaff699.zip
chromium_src-9015c8b4419268a35a5c1a0f2afb7a2a2aaff699.tar.gz
chromium_src-9015c8b4419268a35a5c1a0f2afb7a2a2aaff699.tar.bz2
Convert TextureMailbox to use SharedBitmap instead of SharedMemory.
This reduces the amount of conversions between cc::SharedBitmap and base::SharedMemory in the code. Review URL: https://codereview.chromium.org/791483002 Cr-Commit-Position: refs/heads/master@{#307811}
Diffstat (limited to 'content/renderer/render_thread_impl.cc')
-rw-r--r--content/renderer/render_thread_impl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 74c5b18..5575adb 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -273,8 +273,10 @@ void AddHistogramSample(void* hist, int sample) {
histogram->Add(sample);
}
-scoped_ptr<base::SharedMemory> AllocateSharedMemoryFunction(size_t size) {
- return RenderThreadImpl::Get()->HostAllocateSharedMemoryBuffer(size);
+scoped_ptr<cc::SharedBitmap> AllocateSharedBitmapFunction(
+ const gfx::Size& size) {
+ return ChildThread::current()->shared_bitmap_manager()->AllocateSharedBitmap(
+ size);
}
void EnableBlinkPlatformLogChannels(const std::string& channels) {
@@ -1004,7 +1006,7 @@ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden())
ScheduleIdleHandler(kLongIdleHandlerDelayMs);
- cc_blink::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
+ cc_blink::SetSharedBitmapAllocationFunction(AllocateSharedBitmapFunction);
// Limit use of the scaled image cache to when deferred image decoding is
// enabled.