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

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

Issue 13852023: Reland "gpu: Fix Vivante's "hisilicon" GPUs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@HUAWEI_revert
Patch Set: 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
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 #if defined(OS_ANDROID) 7 #if defined(OS_ANDROID)
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 #endif 9 #endif
10 10
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 if (!Initialize()) { 404 if (!Initialize()) {
405 LOG(ERROR) << "Failed to resize pbuffer."; 405 LOG(ERROR) << "Failed to resize pbuffer.";
406 return false; 406 return false;
407 } 407 }
408 408
409 if (was_current) 409 if (was_current)
410 return current_context->MakeCurrent(this); 410 return current_context->MakeCurrent(this);
411 return true; 411 return true;
412 } 412 }
413 413
414 bool NativeViewGLSurfaceEGL::Recreate() {
415 Destroy();
416 if (!Initialize()) {
417 LOG(ERROR) << "Failed to create surface.";
418 return false;
419 }
420 return true;
421 }
422
414 EGLSurface NativeViewGLSurfaceEGL::GetHandle() { 423 EGLSurface NativeViewGLSurfaceEGL::GetHandle() {
415 return surface_; 424 return surface_;
416 } 425 }
417 426
418 std::string NativeViewGLSurfaceEGL::GetExtensions() { 427 std::string NativeViewGLSurfaceEGL::GetExtensions() {
419 std::string extensions = GLSurface::GetExtensions(); 428 std::string extensions = GLSurface::GetExtensions();
420 if (supports_post_sub_buffer_) { 429 if (supports_post_sub_buffer_) {
421 extensions += extensions.empty() ? "" : " "; 430 extensions += extensions.empty() ? "" : " ";
422 extensions += "GL_CHROMIUM_post_sub_buffer"; 431 extensions += "GL_CHROMIUM_post_sub_buffer";
423 } 432 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 579
571 return handle; 580 return handle;
572 #endif 581 #endif
573 } 582 }
574 583
575 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { 584 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
576 Destroy(); 585 Destroy();
577 } 586 }
578 587
579 } // namespace gfx 588 } // namespace gfx
OLDNEW
« gpu/command_buffer/service/feature_info.cc ('K') | « ui/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698