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

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

Issue 13140006: gpu: Fix Vivante's "hisilicon" GPUs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add recreate work-around Created 7 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
« no previous file with comments | « no previous file | content/gpu/gpu_info_collector_android.cc » ('j') | ui/gl/gl_context_egl.cc » ('J')
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/common/gpu/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/gpu/gpu_command_buffer_stub.h" 8 #include "content/common/gpu/gpu_command_buffer_stub.h"
9 #include "content/common/gpu/gpu_surface_lookup.h" 9 #include "content/common/gpu/gpu_surface_lookup.h"
10 #include "ui/gl/gl_surface_egl.h" 10 #include "ui/gl/gl_surface_egl.h"
(...skipping 11 matching lines...) Expand all
22 GpuSurfaceLookup::GetInstance()->AcquireNativeWidget( 22 GpuSurfaceLookup::GetInstance()->AcquireNativeWidget(
23 stub->surface_id()); 23 stub->surface_id());
24 scoped_refptr<gfx::GLSurface> surface = 24 scoped_refptr<gfx::GLSurface> surface =
25 new gfx::NativeViewGLSurfaceEGL(false, window); 25 new gfx::NativeViewGLSurfaceEGL(false, window);
26 bool initialize_success = surface->Initialize(); 26 bool initialize_success = surface->Initialize();
27 if (window) 27 if (window)
28 ANativeWindow_release(window); 28 ANativeWindow_release(window);
29 if (!initialize_success) 29 if (!initialize_success)
30 return scoped_refptr<gfx::GLSurface>(); 30 return scoped_refptr<gfx::GLSurface>();
31 31
32 if (stub->decoder()
33 ->GetContextGroup()
34 ->feature_info()
35 ->workarounds()
36 .makecurrent_recreates_surfaces) {
no sievers 2013/04/16 01:23:52 Hmm, this is flaky as it depends on some other con
epennerAtGoogle 2013/04/16 02:03:18 I thought about that and it didn't appear to be a
epennerAtGoogle 2013/04/16 02:30:10 You are right, the context-group might not be init
37 static_cast<gfx::NativeViewGLSurfaceEGL*>
38 (surface.get())->SetRecreateOnMakeCurrent(true);
39 }
40
32 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( 41 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
33 manager, stub, surface.get(), false)); 42 manager, stub, surface.get(), false));
34 } 43 }
35 44
36 } // namespace content 45 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/gpu/gpu_info_collector_android.cc » ('j') | ui/gl/gl_context_egl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698