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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1832923002: Clean up calls to CreateGpuMemoryBufferImageCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure. Created 4 years, 9 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (!data->surface_id) { 335 if (!data->surface_id) {
336 surface = make_scoped_ptr(new OffscreenBrowserCompositorOutputSurface( 336 surface = make_scoped_ptr(new OffscreenBrowserCompositorOutputSurface(
337 context_provider, shared_worker_context_provider_, 337 context_provider, shared_worker_context_provider_,
338 compositor->vsync_manager(), 338 compositor->vsync_manager(),
339 scoped_ptr<BrowserCompositorOverlayCandidateValidator>())); 339 scoped_ptr<BrowserCompositorOverlayCandidateValidator>()));
340 } else if (capabilities.gpu.surfaceless) { 340 } else if (capabilities.gpu.surfaceless) {
341 GLenum target = GL_TEXTURE_2D; 341 GLenum target = GL_TEXTURE_2D;
342 GLenum format = GL_RGB; 342 GLenum format = GL_RGB;
343 #if defined(OS_MACOSX) 343 #if defined(OS_MACOSX)
344 target = GL_TEXTURE_RECTANGLE_ARB; 344 target = GL_TEXTURE_RECTANGLE_ARB;
345 format = GL_BGRA_EXT; 345 format = GL_RGBA;
346 #endif 346 #endif
347 surface = 347 surface =
348 make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface( 348 make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface(
349 context_provider, shared_worker_context_provider_, 349 context_provider, shared_worker_context_provider_,
350 data->surface_id, compositor->vsync_manager(), 350 data->surface_id, compositor->vsync_manager(),
351 CreateOverlayCandidateValidator(compositor->widget()), target, 351 CreateOverlayCandidateValidator(compositor->widget()), target,
352 format, BrowserGpuMemoryBufferManager::current())); 352 format, BrowserGpuMemoryBufferManager::current()));
353 } else { 353 } else {
354 scoped_ptr<BrowserCompositorOverlayCandidateValidator> validator; 354 scoped_ptr<BrowserCompositorOverlayCandidateValidator> validator;
355 #if !defined(OS_MACOSX) 355 #if !defined(OS_MACOSX)
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 658 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
659 observer_list_, 659 observer_list_,
660 OnLostResources()); 660 OnLostResources());
661 661
662 // Kill things that use the shared context before killing the shared context. 662 // Kill things that use the shared context before killing the shared context.
663 lost_gl_helper.reset(); 663 lost_gl_helper.reset();
664 lost_shared_main_thread_contexts = NULL; 664 lost_shared_main_thread_contexts = NULL;
665 } 665 }
666 666
667 } // namespace content 667 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698