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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 PerCompositorData* data = it->second; | 292 PerCompositorData* data = it->second; |
293 DCHECK(data); | 293 DCHECK(data); |
294 int gpu_process_id = data->shared_context->GetGPUProcessID(); | 294 int gpu_process_id = data->shared_context->GetGPUProcessID(); |
295 uint32 client_id = data->shared_context->GetChannelID(); | 295 uint32 client_id = data->shared_context->GetChannelID(); |
296 uint32 context_id = data->shared_context->GetContextID(); | 296 uint32 context_id = data->shared_context->GetContextID(); |
297 if (surface.parent_gpu_process_id == gpu_process_id && | 297 if (surface.parent_gpu_process_id == gpu_process_id && |
298 surface.parent_client_id == client_id && | 298 surface.parent_client_id == client_id && |
299 surface.parent_context_id == context_id) { | 299 surface.parent_context_id == context_id) { |
300 data->shared_context->deleteTexture(surface.parent_texture_id[0]); | 300 data->shared_context->deleteTexture(surface.parent_texture_id[0]); |
301 data->shared_context->deleteTexture(surface.parent_texture_id[1]); | 301 data->shared_context->deleteTexture(surface.parent_texture_id[1]); |
| 302 data->shared_context->flush(); |
302 break; | 303 break; |
303 } | 304 } |
304 } | 305 } |
305 } | 306 } |
306 | 307 |
307 virtual WebKit::WebGraphicsContext3D* GetSharedContext( | 308 virtual WebKit::WebGraphicsContext3D* GetSharedContext( |
308 ui::Compositor* compositor) OVERRIDE { | 309 ui::Compositor* compositor) OVERRIDE { |
309 PerCompositorDataMap::const_iterator itr = | 310 PerCompositorDataMap::const_iterator itr = |
310 per_compositor_data_.find(compositor); | 311 per_compositor_data_.find(compositor); |
311 if (itr == per_compositor_data_.end()) | 312 if (itr == per_compositor_data_.end()) |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 void ImageTransportFactory::Terminate() { | 465 void ImageTransportFactory::Terminate() { |
465 ui::ContextFactory::SetInstance(NULL); | 466 ui::ContextFactory::SetInstance(NULL); |
466 delete g_factory; | 467 delete g_factory; |
467 g_factory = NULL; | 468 g_factory = NULL; |
468 } | 469 } |
469 | 470 |
470 // static | 471 // static |
471 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 472 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
472 return g_factory; | 473 return g_factory; |
473 } | 474 } |
OLD | NEW |