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

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

Issue 2514323006: Allow Blink to generate cc::FrameSinkId from RenderThread (Closed)
Patch Set: change to generateFrameSinkId Created 4 years 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/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 return DatabaseUtil::DatabaseSetFileSize( 611 return DatabaseUtil::DatabaseSetFileSize(
612 vfs_file_name, size, sync_message_filter_.get()); 612 vfs_file_name, size, sync_message_filter_.get());
613 } 613 }
614 614
615 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( 615 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier(
616 const blink::WebSecurityOrigin& origin) { 616 const blink::WebSecurityOrigin& origin) {
617 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( 617 return WebString::fromUTF8(storage::GetIdentifierFromOrigin(
618 WebSecurityOriginToGURL(origin))); 618 WebSecurityOriginToGURL(origin)));
619 } 619 }
620 620
621 cc::FrameSinkId RendererBlinkPlatformImpl::generateFrameSinkId() {
622 return cc::FrameSinkId(RenderThread::Get()->GetClientId(),
623 RenderThread::Get()->GenerateRoutingID());
624 }
625
621 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { 626 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() {
622 RenderThreadImpl* thread = RenderThreadImpl::current(); 627 RenderThreadImpl* thread = RenderThreadImpl::current();
623 // thread can be NULL in tests. 628 // thread can be NULL in tests.
624 return thread && thread->compositor_task_runner().get(); 629 return thread && thread->compositor_task_runner().get();
625 } 630 }
626 631
627 bool RendererBlinkPlatformImpl::isGPUCompositingEnabled() { 632 bool RendererBlinkPlatformImpl::isGPUCompositingEnabled() {
628 const base::CommandLine& command_line = 633 const base::CommandLine& command_line =
629 *base::CommandLine::ForCurrentProcess(); 634 *base::CommandLine::ForCurrentProcess();
630 return !command_line.HasSwitch(switches::kDisableGpuCompositing); 635 return !command_line.HasSwitch(switches::kDisableGpuCompositing);
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 return &trial_token_validator_; 1296 return &trial_token_validator_;
1292 } 1297 }
1293 1298
1294 void RendererBlinkPlatformImpl::workerContextCreated( 1299 void RendererBlinkPlatformImpl::workerContextCreated(
1295 const v8::Local<v8::Context>& worker) { 1300 const v8::Local<v8::Context>& worker) {
1296 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( 1301 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
1297 worker); 1302 worker);
1298 } 1303 }
1299 1304
1300 } // namespace content 1305 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698