Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/common/gpu/ca_layer_tree_mac.h" | 5 #include "content/common/gpu/ca_layer_tree_mac.h" |
| 6 | 6 |
| 7 #include <AVFoundation/AVFoundation.h> | 7 #include <AVFoundation/AVFoundation.h> |
| 8 #include <CoreMedia/CoreMedia.h> | 8 #include <CoreMedia/CoreMedia.h> |
| 9 #include <CoreVideo/CoreVideo.h> | 9 #include <CoreVideo/CoreVideo.h> |
| 10 | 10 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 ca_edge_aa_mask |= kCALayerTopEdge; | 248 ca_edge_aa_mask |= kCALayerTopEdge; |
| 249 if (edge_aa_mask & GL_CA_LAYER_EDGE_BOTTOM_CHROMIUM) | 249 if (edge_aa_mask & GL_CA_LAYER_EDGE_BOTTOM_CHROMIUM) |
| 250 ca_edge_aa_mask |= kCALayerBottomEdge; | 250 ca_edge_aa_mask |= kCALayerBottomEdge; |
| 251 } | 251 } |
| 252 | 252 |
| 253 // Only allow 4:2:0 frames which fill the layer's contents to be promoted to | 253 // Only allow 4:2:0 frames which fill the layer's contents to be promoted to |
| 254 // AV layers. | 254 // AV layers. |
| 255 if (IOSurfaceGetPixelFormat(io_surface) == | 255 if (IOSurfaceGetPixelFormat(io_surface) == |
| 256 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange && | 256 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange && |
| 257 contents_rect == gfx::RectF(0, 0, 1, 1)) { | 257 contents_rect == gfx::RectF(0, 0, 1, 1)) { |
| 258 use_av_layer = true; | 258 // Leave AVFoundation disabled for now while crashing and flashing bugs are |
| 259 // being investigated. | |
| 260 // http://crbug.com/598243, http://crbug.com/598388 | |
|
erikchen
2016/04/01 20:16:37
s/http/https
| |
| 261 use_av_layer = false; | |
| 259 } | 262 } |
| 260 } | 263 } |
| 261 | 264 |
| 262 CALayerTree::ContentLayer::ContentLayer(ContentLayer&& layer) | 265 CALayerTree::ContentLayer::ContentLayer(ContentLayer&& layer) |
| 263 : io_surface(layer.io_surface), | 266 : io_surface(layer.io_surface), |
| 264 contents_rect(layer.contents_rect), | 267 contents_rect(layer.contents_rect), |
| 265 rect(layer.rect), | 268 rect(layer.rect), |
| 266 background_color(layer.background_color), | 269 background_color(layer.background_color), |
| 267 ca_edge_aa_mask(layer.ca_edge_aa_mask), | 270 ca_edge_aa_mask(layer.ca_edge_aa_mask), |
| 268 opacity(layer.opacity), | 271 opacity(layer.opacity), |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 } else { | 562 } else { |
| 560 // Grey represents a CALayer that has not changed. | 563 // Grey represents a CALayer that has not changed. |
| 561 color.reset(CGColorCreateGenericRGB(0, 0, 0, 0.1)); | 564 color.reset(CGColorCreateGenericRGB(0, 0, 0, 0.1)); |
| 562 } | 565 } |
| 563 [ca_layer setBorderWidth:1]; | 566 [ca_layer setBorderWidth:1]; |
| 564 [ca_layer setBorderColor:color]; | 567 [ca_layer setBorderColor:color]; |
| 565 } | 568 } |
| 566 } | 569 } |
| 567 | 570 |
| 568 } // namespace content | 571 } // namespace content |
| OLD | NEW |