OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 177 } |
178 | 178 |
179 bool RenderVideo::acceleratedRenderingInUse() | 179 bool RenderVideo::acceleratedRenderingInUse() |
180 { | 180 { |
181 blink::WebLayer* webLayer = mediaElement()->platformLayer(); | 181 blink::WebLayer* webLayer = mediaElement()->platformLayer(); |
182 return webLayer && !webLayer->isOrphan(); | 182 return webLayer && !webLayer->isOrphan(); |
183 } | 183 } |
184 | 184 |
185 void RenderVideo::layout() | 185 void RenderVideo::layout() |
186 { | 186 { |
| 187 setMayNeedInvalidation(true); |
187 updatePlayer(); | 188 updatePlayer(); |
188 RenderMedia::layout(); | 189 RenderMedia::layout(); |
189 } | 190 } |
190 | 191 |
191 HTMLVideoElement* RenderVideo::videoElement() const | 192 HTMLVideoElement* RenderVideo::videoElement() const |
192 { | 193 { |
193 return toHTMLVideoElement(node()); | 194 return toHTMLVideoElement(node()); |
194 } | 195 } |
195 | 196 |
196 void RenderVideo::updateFromElement() | 197 void RenderVideo::updateFromElement() |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 return CompositingReasonVideo; | 283 return CompositingReasonVideo; |
283 } | 284 } |
284 | 285 |
285 if ((triggers & VideoTrigger) && shouldDisplayVideo() && supportsAccelerated
Rendering()) | 286 if ((triggers & VideoTrigger) && shouldDisplayVideo() && supportsAccelerated
Rendering()) |
286 return CompositingReasonVideo; | 287 return CompositingReasonVideo; |
287 | 288 |
288 return CompositingReasonNone; | 289 return CompositingReasonNone; |
289 } | 290 } |
290 | 291 |
291 } // namespace WebCore | 292 } // namespace WebCore |
OLD | NEW |