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

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: Remove unneeded changes. 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_) {
no sievers 2013/01/28 20:55:06 if (window_ == kNullAcceleratedWidget)
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 558
554 return handle; 559 return handle;
555 #endif 560 #endif
556 } 561 }
557 562
558 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { 563 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
559 Destroy(); 564 Destroy();
560 } 565 }
561 566
562 } // namespace gfx 567 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698