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

Side by Side Diff: blimp/engine/app/ui/blimp_ui_context_factory.cc

Issue 1808313002: Register surface namespace in BlimpUiContextFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to patch #1 T_T 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
« no previous file with comments | « blimp/engine/DEPS ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/app/ui/blimp_ui_context_factory.h" 5 #include "blimp/engine/app/ui/blimp_ui_context_factory.h"
6 6
7 #include "cc/output/output_surface.h" 7 #include "cc/output/output_surface.h"
8 #include "cc/resources/shared_bitmap_manager.h" 8 #include "cc/resources/shared_bitmap_manager.h"
9 #include "cc/surfaces/surface_id_allocator.h" 9 #include "cc/surfaces/surface_id_allocator.h"
10 #include "content/browser/compositor/image_transport_factory.h"
10 #include "third_party/khronos/GLES2/gl2.h" 11 #include "third_party/khronos/GLES2/gl2.h"
11 #include "ui/compositor/reflector.h" 12 #include "ui/compositor/reflector.h"
12 13
13 namespace blimp { 14 namespace blimp {
14 namespace engine { 15 namespace engine {
15 16
16 BlimpUiContextFactory::BlimpUiContextFactory() 17 BlimpUiContextFactory::BlimpUiContextFactory()
17 : next_surface_id_namespace_(1u) {} 18 : next_surface_id_namespace_(1u) {}
18 19
19 BlimpUiContextFactory::~BlimpUiContextFactory() {} 20 BlimpUiContextFactory::~BlimpUiContextFactory() {}
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 BlimpUiContextFactory::GetGpuMemoryBufferManager() { 64 BlimpUiContextFactory::GetGpuMemoryBufferManager() {
64 return nullptr; 65 return nullptr;
65 } 66 }
66 67
67 cc::TaskGraphRunner* BlimpUiContextFactory::GetTaskGraphRunner() { 68 cc::TaskGraphRunner* BlimpUiContextFactory::GetTaskGraphRunner() {
68 return &task_graph_runner_; 69 return &task_graph_runner_;
69 } 70 }
70 71
71 scoped_ptr<cc::SurfaceIdAllocator> 72 scoped_ptr<cc::SurfaceIdAllocator>
72 BlimpUiContextFactory::CreateSurfaceIdAllocator() { 73 BlimpUiContextFactory::CreateSurfaceIdAllocator() {
73 return make_scoped_ptr( 74 scoped_ptr<cc::SurfaceIdAllocator> allocator(
74 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 75 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
76 content::ImageTransportFactory* factory =
77 content::ImageTransportFactory::GetInstance();
78 if (factory->GetSurfaceManager())
79 allocator->RegisterSurfaceIdNamespace(factory->GetSurfaceManager());
80 return allocator;
75 } 81 }
76 82
77 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor, 83 void BlimpUiContextFactory::ResizeDisplay(ui::Compositor* compositor,
78 const gfx::Size& size) { 84 const gfx::Size& size) {
79 NOTIMPLEMENTED(); 85 NOTIMPLEMENTED();
80 } 86 }
81 87
82 } // namespace engine 88 } // namespace engine
83 } // namespace blimp 89 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698