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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 893623002: Revert of Flip flag to turn CrOS Browser Compositor Single Threaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « content/browser/compositor/gpu_process_transport_factory.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DISALLOW_COPY_AND_ASSIGN(DirectOutputSurface); 60 DISALLOW_COPY_AND_ASSIGN(DirectOutputSurface);
61 }; 61 };
62 62
63 } // namespace 63 } // namespace
64 64
65 InProcessContextFactory::InProcessContextFactory() 65 InProcessContextFactory::InProcessContextFactory()
66 : next_surface_id_namespace_(1u), use_test_surface_(true) { 66 : next_surface_id_namespace_(1u), use_test_surface_(true) {
67 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) 67 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone)
68 << "If running tests, ensure that main() is calling " 68 << "If running tests, ensure that main() is calling "
69 << "gfx::GLSurface::InitializeOneOffForTests()"; 69 << "gfx::GLSurface::InitializeOneOffForTests()";
70
71 #if defined(OS_CHROMEOS)
72 bool use_thread = !base::CommandLine::ForCurrentProcess()->HasSwitch(
73 switches::kUIDisableThreadedCompositing);
74 #else
75 bool use_thread = false;
76 #endif
77 if (use_thread) {
78 compositor_thread_.reset(new base::Thread("Browser Compositor"));
79 compositor_thread_->Start();
80 }
70 } 81 }
71 82
72 InProcessContextFactory::~InProcessContextFactory() {} 83 InProcessContextFactory::~InProcessContextFactory() {}
73 84
74 void InProcessContextFactory::CreateOutputSurface( 85 void InProcessContextFactory::CreateOutputSurface(
75 base::WeakPtr<Compositor> compositor, 86 base::WeakPtr<Compositor> compositor,
76 bool software_fallback) { 87 bool software_fallback) {
77 DCHECK(!software_fallback); 88 DCHECK(!software_fallback);
78 gpu::gles2::ContextCreationAttribHelper attribs; 89 gpu::gles2::ContextCreationAttribHelper attribs;
79 attribs.alpha_size = 8; 90 attribs.alpha_size = 8;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 InProcessContextFactory::CreateSurfaceIdAllocator() { 161 InProcessContextFactory::CreateSurfaceIdAllocator() {
151 return make_scoped_ptr( 162 return make_scoped_ptr(
152 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 163 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
153 } 164 }
154 165
155 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 166 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
156 const gfx::Size& size) { 167 const gfx::Size& size) {
157 } 168 }
158 169
159 } // namespace ui 170 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698