| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 298 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 299 int z_order, | 299 int z_order, |
| 300 gfx::OverlayTransform transform, | 300 gfx::OverlayTransform transform, |
| 301 const gfx::Rect& bounds_rect, | 301 const gfx::Rect& bounds_rect, |
| 302 const gfx::RectF& crop_rect) override { | 302 const gfx::RectF& crop_rect) override { |
| 303 return ui::SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane( | 303 return ui::SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane( |
| 304 widget, z_order, transform, pixmap_, bounds_rect, crop_rect); | 304 widget, z_order, transform, pixmap_, bounds_rect, crop_rect); |
| 305 } | 305 } |
| 306 | 306 |
| 307 private: | 307 private: |
| 308 ~SurfaceImage() override {} |
| 309 |
| 308 scoped_refptr<ui::NativePixmap> pixmap_; | 310 scoped_refptr<ui::NativePixmap> pixmap_; |
| 309 }; | 311 }; |
| 310 | 312 |
| 311 ~GLSurfaceOzoneSurfacelessSurfaceImpl() override { | 313 ~GLSurfaceOzoneSurfacelessSurfaceImpl() override { |
| 312 DCHECK(!fbo_); | 314 DCHECK(!fbo_); |
| 313 for (size_t i = 0; i < arraysize(textures_); i++) | 315 for (size_t i = 0; i < arraysize(textures_); i++) |
| 314 DCHECK(!textures_[i]) << "texture " << i << " not released"; | 316 DCHECK(!textures_[i]) << "texture " << i << " not released"; |
| 315 } | 317 } |
| 316 | 318 |
| 317 void BindFramebuffer() { | 319 void BindFramebuffer() { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 NOTREACHED(); | 462 NOTREACHED(); |
| 461 return NULL; | 463 return NULL; |
| 462 } | 464 } |
| 463 } | 465 } |
| 464 | 466 |
| 465 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 467 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
| 466 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); | 468 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); |
| 467 } | 469 } |
| 468 | 470 |
| 469 } // namespace gfx | 471 } // namespace gfx |
| OLD | NEW |