OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/image_transport_factory.h" | 5 #include "content/browser/renderer_host/image_transport_factory.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 DCHECK(data); | 300 DCHECK(data); |
301 ContentGLContext* context = data->shared_context->content_gl_context(); | 301 ContentGLContext* context = data->shared_context->content_gl_context(); |
302 int gpu_process_id = context->GetGPUProcessID(); | 302 int gpu_process_id = context->GetGPUProcessID(); |
303 uint32 client_id = context->GetChannelID(); | 303 uint32 client_id = context->GetChannelID(); |
304 uint32 context_id = context->GetContextID(); | 304 uint32 context_id = context->GetContextID(); |
305 if (surface.parent_gpu_process_id == gpu_process_id && | 305 if (surface.parent_gpu_process_id == gpu_process_id && |
306 surface.parent_client_id == client_id && | 306 surface.parent_client_id == client_id && |
307 surface.parent_context_id == context_id) { | 307 surface.parent_context_id == context_id) { |
308 data->shared_context->deleteTexture(surface.parent_texture_id[0]); | 308 data->shared_context->deleteTexture(surface.parent_texture_id[0]); |
309 data->shared_context->deleteTexture(surface.parent_texture_id[1]); | 309 data->shared_context->deleteTexture(surface.parent_texture_id[1]); |
| 310 data->shared_context->flush(); |
310 break; | 311 break; |
311 } | 312 } |
312 } | 313 } |
313 } | 314 } |
314 | 315 |
315 virtual WebKit::WebGraphicsContext3D* GetSharedContext( | 316 virtual WebKit::WebGraphicsContext3D* GetSharedContext( |
316 ui::Compositor* compositor) OVERRIDE { | 317 ui::Compositor* compositor) OVERRIDE { |
317 PerCompositorDataMap::const_iterator itr = | 318 PerCompositorDataMap::const_iterator itr = |
318 per_compositor_data_.find(compositor); | 319 per_compositor_data_.find(compositor); |
319 if (itr == per_compositor_data_.end()) | 320 if (itr == per_compositor_data_.end()) |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 void ImageTransportFactory::Terminate() { | 443 void ImageTransportFactory::Terminate() { |
443 ui::ContextFactory::SetInstance(NULL); | 444 ui::ContextFactory::SetInstance(NULL); |
444 delete g_factory; | 445 delete g_factory; |
445 g_factory = NULL; | 446 g_factory = NULL; |
446 } | 447 } |
447 | 448 |
448 // static | 449 // static |
449 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 450 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
450 return g_factory; | 451 return g_factory; |
451 } | 452 } |
OLD | NEW |