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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 12038095: Android webview fix gpu crashes after destroy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 7 years, 11 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
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 "ui/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 : window_(window), 217 : window_(window),
218 surface_(NULL), 218 surface_(NULL),
219 supports_post_sub_buffer_(false), 219 supports_post_sub_buffer_(false),
220 config_(NULL) { 220 config_(NULL) {
221 software_ = software; 221 software_ = software;
222 } 222 }
223 223
224 bool NativeViewGLSurfaceEGL::Initialize() { 224 bool NativeViewGLSurfaceEGL::Initialize() {
225 DCHECK(!surface_); 225 DCHECK(!surface_);
226 226
227 if (!window_) {
228 LOG(ERROR) << "Trying to create surface without window.";
229 return false;
230 }
231
227 if (!GetDisplay()) { 232 if (!GetDisplay()) {
228 LOG(ERROR) << "Trying to create surface with invalid display."; 233 LOG(ERROR) << "Trying to create surface with invalid display.";
229 return false; 234 return false;
230 } 235 }
231 236
232 static const EGLint egl_window_attributes_sub_buffer[] = { 237 static const EGLint egl_window_attributes_sub_buffer[] = {
233 EGL_POST_SUB_BUFFER_SUPPORTED_NV, EGL_TRUE, 238 EGL_POST_SUB_BUFFER_SUPPORTED_NV, EGL_TRUE,
234 EGL_NONE 239 EGL_NONE
235 }; 240 };
236 241
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 554
550 return handle; 555 return handle;
551 #endif 556 #endif
552 } 557 }
553 558
554 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { 559 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
555 Destroy(); 560 Destroy();
556 } 561 }
557 562
558 } // namespace gfx 563 } // namespace gfx
OLDNEW
« content/common/gpu/image_transport_surface_android.cc ('K') | « ui/gl/gl_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698