OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/aura/gpu_process_transport_factory.h" | 5 #include "content/browser/aura/gpu_process_transport_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 return; | 301 return; |
302 PerCompositorData* data = it->second; | 302 PerCompositorData* data = it->second; |
303 DCHECK(data); | 303 DCHECK(data); |
304 GpuSurfaceTracker::Get()->RemoveSurface(data->surface_id); | 304 GpuSurfaceTracker::Get()->RemoveSurface(data->surface_id); |
305 delete data; | 305 delete data; |
306 per_compositor_data_.erase(it); | 306 per_compositor_data_.erase(it); |
307 if (per_compositor_data_.empty()) | 307 if (per_compositor_data_.empty()) |
308 gl_helper_.reset(); | 308 gl_helper_.reset(); |
309 } | 309 } |
310 | 310 |
311 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } | |
312 | |
313 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() { | 311 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() { |
314 return this; | 312 return this; |
315 } | 313 } |
316 | 314 |
317 gfx::GLSurfaceHandle GpuProcessTransportFactory::CreateSharedSurfaceHandle() { | 315 gfx::GLSurfaceHandle GpuProcessTransportFactory::CreateSharedSurfaceHandle() { |
318 CreateSharedContextLazy(); | 316 CreateSharedContextLazy(); |
319 if (!shared_contexts_main_thread_ || | 317 if (!shared_contexts_main_thread_ || |
320 !shared_contexts_main_thread_->Context3d()) | 318 !shared_contexts_main_thread_->Context3d()) |
321 return gfx::GLSurfaceHandle(); | 319 return gfx::GLSurfaceHandle(); |
322 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( | 320 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 shared_contexts_main_thread_ = NULL; | 506 shared_contexts_main_thread_ = NULL; |
509 | 507 |
510 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); | 508 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); |
511 | 509 |
512 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 510 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
513 observer_list_, | 511 observer_list_, |
514 OnLostResources()); | 512 OnLostResources()); |
515 } | 513 } |
516 | 514 |
517 } // namespace content | 515 } // namespace content |
OLD | NEW |