Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 10214014: Backport to R19 of r132638 r133017 r133579 r133732 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698