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

Side by Side Diff: content/public/browser/surface_utils.cc

Issue 1808313002: Register surface namespace in BlimpUiContextFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Host surface_utils into chrome/public Created 4 years, 9 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/browser/surface_utils.h"
6
7 #include "build/build_config.h"
8 #include "cc/surfaces/surface_id_allocator.h"
9
10 #if defined(OS_ANDROID)
11 #include "content/browser/renderer_host/compositor_impl_android.h"
12 #else
13 #include "content/browser/compositor/image_transport_factory.h"
14 #include "ui/compositor/compositor.h"
15 #endif
16
17 namespace content {
18
19 scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() {
20 #if defined(OS_ANDROID)
21 return CompositorImpl::CreateSurfaceIdAllocator();
22 #else
23 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
24 return factory->GetContextFactory()->CreateSurfaceIdAllocator();
25 #endif
26 }
27
28 cc::SurfaceManager* GetSurfaceManager() {
29 #if defined(OS_ANDROID)
30 return CompositorImpl::GetSurfaceManager();
31 #else
32 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
33 return factory->GetSurfaceManager();
34 #endif
35 }
36
37 } // namespace content
OLDNEW
« content/public/browser/surface_utils.h ('K') | « content/public/browser/surface_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698