OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 29 matching lines...) Expand all Loading... |
40 GraphicsLayerTreeBuilder::GraphicsLayerTreeBuilder() | 40 GraphicsLayerTreeBuilder::GraphicsLayerTreeBuilder() |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 GraphicsLayerTreeBuilder::~GraphicsLayerTreeBuilder() | 44 GraphicsLayerTreeBuilder::~GraphicsLayerTreeBuilder() |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 static bool shouldAppendLayer(const DeprecatedPaintLayer& layer) | 48 static bool shouldAppendLayer(const DeprecatedPaintLayer& layer) |
49 { | 49 { |
50 if (!RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) | |
51 return true; | |
52 Node* node = layer.layoutObject()->node(); | 50 Node* node = layer.layoutObject()->node(); |
53 if (node && isHTMLVideoElement(*node)) { | 51 if (node && isHTMLVideoElement(*node)) { |
54 HTMLVideoElement* element = toHTMLVideoElement(node); | 52 HTMLVideoElement* element = toHTMLVideoElement(node); |
55 // For WebRTC, video frame contains all the data and no hardware surface
is used. | 53 if (element->isFullscreen() && element->usesOverlayFullscreenVideo()) |
56 // We should always append the layer in this case. | |
57 if (element->isFullscreen() && !HTMLMediaElement::isMediaStreamURL(eleme
nt->sourceURL().string())) | |
58 return false; | 54 return false; |
59 } | 55 } |
60 return true; | 56 return true; |
61 } | 57 } |
62 | 58 |
63 void GraphicsLayerTreeBuilder::rebuild(DeprecatedPaintLayer& layer, AncestorInfo
info) | 59 void GraphicsLayerTreeBuilder::rebuild(DeprecatedPaintLayer& layer, AncestorInfo
info) |
64 { | 60 { |
65 // Make the layer compositing if necessary, and set up clipping and content
layers. | 61 // Make the layer compositing if necessary, and set up clipping and content
layers. |
66 // Note that we can only do work here that is independent of whether the des
cendant layers | 62 // Note that we can only do work here that is independent of whether the des
cendant layers |
67 // have been processed. computeCompositingRequirements() will already have d
one the paint invalidation if necessary. | 63 // have been processed. computeCompositingRequirements() will already have d
one the paint invalidation if necessary. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 127 } |
132 | 128 |
133 if (layer.scrollParent() | 129 if (layer.scrollParent() |
134 && layer.scrollParent()->hasCompositedDeprecatedPaintLayerMapping() | 130 && layer.scrollParent()->hasCompositedDeprecatedPaintLayerMapping() |
135 && layer.scrollParent()->compositedDeprecatedPaintLayerMapping()->needsT
oReparentOverflowControls() | 131 && layer.scrollParent()->compositedDeprecatedPaintLayerMapping()->needsT
oReparentOverflowControls() |
136 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) | 132 && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &laye
r) |
137 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedDeprecatedPaintLayerMapping()->detachLayerForOverflowControls(*info.e
nclosingCompositedLayer)); | 133 info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()-
>compositedDeprecatedPaintLayerMapping()->detachLayerForOverflowControls(*info.e
nclosingCompositedLayer)); |
138 } | 134 } |
139 | 135 |
140 } | 136 } |
OLD | NEW |