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