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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 OverlayTransform transform, | 217 OverlayTransform transform, |
218 GLImage* image, | 218 GLImage* image, |
219 const Rect& bounds_rect, | 219 const Rect& bounds_rect, |
220 const RectF& crop_rect) | 220 const RectF& crop_rect) |
221 : z_order(z_order), | 221 : z_order(z_order), |
222 transform(transform), | 222 transform(transform), |
223 image(image), | 223 image(image), |
224 bounds_rect(bounds_rect), | 224 bounds_rect(bounds_rect), |
225 crop_rect(crop_rect) {} | 225 crop_rect(crop_rect) {} |
226 | 226 |
227 bool GLSurfaceOzoneSurfaceless::Overlay::ScheduleOverlayPlane( | 227 bool GLSurfaceOzoneSurfaceless::Overlay::ScheduleOverlayPlane( |
reveman
2015/11/12 14:58:26
why is this called after the image has been destro
william.xie1
2015/11/12 15:37:43
the image is in the unsubmitted_frames_, and will
spang
2015/11/12 15:47:52
If it was totally valid when scheduled, we can't j
kalyank
2015/11/12 16:36:52
When Media pipeline is destroyed, callback for pro
| |
228 gfx::AcceleratedWidget widget) const { | 228 gfx::AcceleratedWidget widget) const { |
229 return image->ScheduleOverlayPlane(widget, z_order, transform, bounds_rect, | 229 if (image->IsValid()) |
230 crop_rect); | 230 return image->ScheduleOverlayPlane(widget, z_order, transform, bounds_rect, |
231 crop_rect); | |
232 return true; | |
231 } | 233 } |
232 | 234 |
233 GLSurfaceOzoneSurfaceless::PendingFrame::PendingFrame() : ready(false) {} | 235 GLSurfaceOzoneSurfaceless::PendingFrame::PendingFrame() : ready(false) {} |
234 | 236 |
235 bool GLSurfaceOzoneSurfaceless::PendingFrame::ScheduleOverlayPlanes( | 237 bool GLSurfaceOzoneSurfaceless::PendingFrame::ScheduleOverlayPlanes( |
236 gfx::AcceleratedWidget widget) { | 238 gfx::AcceleratedWidget widget) { |
237 for (const auto& overlay : overlays) | 239 for (const auto& overlay : overlays) |
238 if (!overlay.ScheduleOverlayPlane(widget)) | 240 if (!overlay.ScheduleOverlayPlane(widget)) |
239 return false; | 241 return false; |
240 return true; | 242 return true; |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
714 } | 716 } |
715 } | 717 } |
716 | 718 |
717 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 719 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
718 return ui::OzonePlatform::GetInstance() | 720 return ui::OzonePlatform::GetInstance() |
719 ->GetSurfaceFactoryOzone() | 721 ->GetSurfaceFactoryOzone() |
720 ->GetNativeDisplay(); | 722 ->GetNativeDisplay(); |
721 } | 723 } |
722 | 724 |
723 } // namespace gfx | 725 } // namespace gfx |
OLD | NEW |