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

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

Issue 1887563002: ozone: fix crash when running video decode unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 texture = 0; 596 texture = 0;
597 glDeleteFramebuffersEXT(1, &fbo_); 597 glDeleteFramebuffersEXT(1, &fbo_);
598 fbo_ = 0; 598 fbo_ = 0;
599 } 599 }
600 for (auto image : images_) { 600 for (auto image : images_) {
601 if (image) 601 if (image)
602 image->Destroy(true); 602 image->Destroy(true);
603 } 603 }
604 604
605 if (!was_current) { 605 if (!was_current) {
606 previous_context->MakeCurrent(previous_surface.get()); 606 if (previous_context) {
spang 2016/04/13 14:00:49 Seems like it should be if (!was_current && previ
spang 2016/04/13 14:16:20 I guess it's fine the way it is, if you fall throu
607 } else { 607 previous_context->MakeCurrent(previous_surface.get());
608 context_->ReleaseCurrent(this); 608 } else {
609 context_->ReleaseCurrent(this);
610 }
609 } 611 }
610 } 612 }
611 613
612 bool GLSurfaceOzoneSurfacelessSurfaceImpl::IsSurfaceless() const { 614 bool GLSurfaceOzoneSurfacelessSurfaceImpl::IsSurfaceless() const {
613 return false; 615 return false;
614 } 616 }
615 617
616 GLSurfaceOzoneSurfacelessSurfaceImpl::~GLSurfaceOzoneSurfacelessSurfaceImpl() { 618 GLSurfaceOzoneSurfacelessSurfaceImpl::~GLSurfaceOzoneSurfacelessSurfaceImpl() {
617 Destroy(); 619 Destroy();
618 } 620 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 } 782 }
781 } 783 }
782 784
783 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 785 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
784 return ui::OzonePlatform::GetInstance() 786 return ui::OzonePlatform::GetInstance()
785 ->GetSurfaceFactoryOzone() 787 ->GetSurfaceFactoryOzone()
786 ->GetNativeDisplay(); 788 ->GetNativeDisplay();
787 } 789 }
788 790
789 } // namespace gfx 791 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698