Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |