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

Side by Side Diff: content/common/gpu/image_transport_surface_android.cc

Issue 1784193003: content gpu refactor: get rid of gpu related content switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update 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
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/common/gpu/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 #include "base/command_line.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_channel_manager.h"
11 #include "content/common/gpu/gpu_command_buffer_stub.h"
12 #include "content/common/gpu/gpu_surface_lookup.h" 8 #include "content/common/gpu/gpu_surface_lookup.h"
13 #include "content/common/gpu/pass_through_image_transport_surface.h" 9 #include "content/common/gpu/pass_through_image_transport_surface.h"
14 #include "content/public/common/content_switches.h"
15 #include "ui/gl/gl_surface_egl.h" 10 #include "ui/gl/gl_surface_egl.h"
16 11
17 namespace content { 12 namespace content {
18 13
19 // static 14 // static
20 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( 15 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
21 GpuChannelManager* manager, 16 GpuChannelManager* manager,
22 GpuCommandBufferStub* stub, 17 GpuCommandBufferStub* stub,
23 const gfx::GLSurfaceHandle& handle, 18 const gfx::GLSurfaceHandle& handle,
24 gfx::GLSurface::Format format) { 19 gfx::GLSurface::Format format) {
(...skipping 10 matching lines...) Expand all
35 bool initialize_success = surface->Initialize(format); 30 bool initialize_success = surface->Initialize(format);
36 ANativeWindow_release(window); 31 ANativeWindow_release(window);
37 if (!initialize_success) 32 if (!initialize_success)
38 return scoped_refptr<gfx::GLSurface>(); 33 return scoped_refptr<gfx::GLSurface>();
39 34
40 return scoped_refptr<gfx::GLSurface>( 35 return scoped_refptr<gfx::GLSurface>(
41 new PassThroughImageTransportSurface(manager, stub, surface.get())); 36 new PassThroughImageTransportSurface(manager, stub, surface.get()));
42 } 37 }
43 38
44 } // namespace content 39 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698