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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 } // namespace 97 } // namespace
98 98
99 InProcessContextFactory::InProcessContextFactory( 99 InProcessContextFactory::InProcessContextFactory(
100 bool context_factory_for_test, 100 bool context_factory_for_test,
101 cc::SurfaceManager* surface_manager) 101 cc::SurfaceManager* surface_manager)
102 : next_surface_id_namespace_(1u), 102 : next_surface_id_namespace_(1u),
103 use_test_surface_(true), 103 use_test_surface_(true),
104 context_factory_for_test_(context_factory_for_test), 104 context_factory_for_test_(context_factory_for_test),
105 surface_manager_(surface_manager) { 105 surface_manager_(surface_manager) {
106 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) 106 DCHECK_NE(gl::GetGLImplementation(), gl::kGLImplementationNone)
107 << "If running tests, ensure that main() is calling " 107 << "If running tests, ensure that main() is calling "
108 << "gfx::GLSurfaceTestSupport::InitializeOneOff()"; 108 << "gl::GLSurfaceTestSupport::InitializeOneOff()";
109 } 109 }
110 110
111 InProcessContextFactory::~InProcessContextFactory() { 111 InProcessContextFactory::~InProcessContextFactory() {
112 DCHECK(per_compositor_data_.empty()); 112 DCHECK(per_compositor_data_.empty());
113 } 113 }
114 114
115 void InProcessContextFactory::CreateOutputSurface( 115 void InProcessContextFactory::CreateOutputSurface(
116 base::WeakPtr<Compositor> compositor) { 116 base::WeakPtr<Compositor> compositor) {
117 // Try to reuse existing shared worker context provider. 117 // Try to reuse existing shared worker context provider.
118 bool shared_worker_context_provider_lost = false; 118 bool shared_worker_context_provider_lost = false;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 259 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
260 const gfx::Size& size) { 260 const gfx::Size& size) {
261 if (!per_compositor_data_.count(compositor)) 261 if (!per_compositor_data_.count(compositor))
262 return; 262 return;
263 per_compositor_data_[compositor]->display()->Resize(size); 263 per_compositor_data_[compositor]->display()->Resize(size);
264 } 264 }
265 265
266 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/context_factories_for_test.cc ('k') | ui/compositor/test/in_process_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698