| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 return; | 317 return; |
| 318 PerCompositorData* data = it->second; | 318 PerCompositorData* data = it->second; |
| 319 DCHECK(data); | 319 DCHECK(data); |
| 320 GpuSurfaceTracker::Get()->RemoveSurface(data->surface_id); | 320 GpuSurfaceTracker::Get()->RemoveSurface(data->surface_id); |
| 321 delete data; | 321 delete data; |
| 322 per_compositor_data_.erase(it); | 322 per_compositor_data_.erase(it); |
| 323 if (per_compositor_data_.empty()) | 323 if (per_compositor_data_.empty()) |
| 324 gl_helper_.reset(); | 324 gl_helper_.reset(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } |
| 328 |
| 327 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() { | 329 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() { |
| 328 return this; | 330 return this; |
| 329 } | 331 } |
| 330 | 332 |
| 331 gfx::GLSurfaceHandle GpuProcessTransportFactory::CreateSharedSurfaceHandle() { | 333 gfx::GLSurfaceHandle GpuProcessTransportFactory::CreateSharedSurfaceHandle() { |
| 332 CreateSharedContextLazy(); | 334 CreateSharedContextLazy(); |
| 333 if (!shared_contexts_main_thread_ || | 335 if (!shared_contexts_main_thread_ || |
| 334 !shared_contexts_main_thread_->Context3d()) | 336 !shared_contexts_main_thread_->Context3d()) |
| 335 return gfx::GLSurfaceHandle(); | 337 return gfx::GLSurfaceHandle(); |
| 336 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( | 338 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 shared_contexts_main_thread_ = NULL; | 524 shared_contexts_main_thread_ = NULL; |
| 523 | 525 |
| 524 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); | 526 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); |
| 525 | 527 |
| 526 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 528 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
| 527 observer_list_, | 529 observer_list_, |
| 528 OnLostResources()); | 530 OnLostResources()); |
| 529 } | 531 } |
| 530 | 532 |
| 531 } // namespace content | 533 } // namespace content |
| OLD | NEW |