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

Unified Diff: ui/accelerated_widget_mac/ca_renderer_layer_tree.mm

Issue 2117103002: Fixed case with no GLImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/image_transport_surface_overlay_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
diff --git a/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm b/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
index 5aa0176c2af2f6da110aad0a4b171602001ab064..d5b3734a72676c4e534753b54e55c877b84bdc01 100644
--- a/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
+++ b/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
@@ -394,13 +394,15 @@ void CARendererLayerTree::ClipAndSortingLayer::AddContentLayer(
void CARendererLayerTree::TransformLayer::AddContentLayer(
const CARendererLayerParams& params) {
- gl::GLImageIOSurface* io_surface_image =
- gl::GLImageIOSurface::FromGLImage(params.image);
- DCHECK(io_surface_image);
- base::ScopedCFTypeRef<IOSurfaceRef> io_surface =
- io_surface_image->io_surface();
- base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer =
- io_surface_image->cv_pixel_buffer();
+ base::ScopedCFTypeRef<IOSurfaceRef> io_surface;
+ base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer;
+ if (params.image) {
+ gl::GLImageIOSurface* io_surface_image =
+ gl::GLImageIOSurface::FromGLImage(params.image);
+ DCHECK(io_surface_image);
+ io_surface = io_surface_image->io_surface();
+ cv_pixel_buffer = io_surface_image->cv_pixel_buffer();
+ }
content_layers.push_back(
ContentLayer(io_surface, cv_pixel_buffer, params.contents_rect,
« no previous file with comments | « gpu/ipc/service/image_transport_surface_overlay_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698