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 * | 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 return false; | 289 return false; |
290 } | 290 } |
291 | 291 |
292 bool RenderLayerCompositor::canRender3DTransforms() const | 292 bool RenderLayerCompositor::canRender3DTransforms() const |
293 { | 293 { |
294 return hasAcceleratedCompositing() && (m_compositingTriggers & ChromeClient:
:ThreeDTransformTrigger); | 294 return hasAcceleratedCompositing() && (m_compositingTriggers & ChromeClient:
:ThreeDTransformTrigger); |
295 } | 295 } |
296 | 296 |
297 void RenderLayerCompositor::setCompositingLayersNeedRebuild(bool needRebuild) | 297 void RenderLayerCompositor::setCompositingLayersNeedRebuild(bool needRebuild) |
298 { | 298 { |
| 299 // FIXME: crbug,com/332248 ideally this could be merged with setNeedsComposi
tingUpdate(). |
299 if (inCompositingMode()) | 300 if (inCompositingMode()) |
300 m_compositingLayersNeedRebuild = needRebuild; | 301 m_compositingLayersNeedRebuild = needRebuild; |
| 302 |
| 303 m_renderView->frameView()->scheduleAnimation(); |
301 } | 304 } |
302 | 305 |
303 void RenderLayerCompositor::updateCompositingRequirementsState() | 306 void RenderLayerCompositor::updateCompositingRequirementsState() |
304 { | 307 { |
305 if (!m_needsUpdateCompositingRequirementsState) | 308 if (!m_needsUpdateCompositingRequirementsState) |
306 return; | 309 return; |
307 | 310 |
308 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo
mpositingRequirementsState"); | 311 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo
mpositingRequirementsState"); |
309 | 312 |
310 m_needsUpdateCompositingRequirementsState = false; | 313 m_needsUpdateCompositingRequirementsState = false; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 break; | 381 break; |
379 case CompositingUpdateOnScroll: | 382 case CompositingUpdateOnScroll: |
380 m_needsToRecomputeCompositingRequirements = true; // Overlap can change
with scrolling, so need to check for hierarchy updates. | 383 m_needsToRecomputeCompositingRequirements = true; // Overlap can change
with scrolling, so need to check for hierarchy updates. |
381 m_needsToUpdateLayerTreeGeometry = true; | 384 m_needsToUpdateLayerTreeGeometry = true; |
382 break; | 385 break; |
383 case CompositingUpdateOnCompositedScroll: | 386 case CompositingUpdateOnCompositedScroll: |
384 m_needsToUpdateLayerTreeGeometry = true; | 387 m_needsToUpdateLayerTreeGeometry = true; |
385 break; | 388 break; |
386 } | 389 } |
387 | 390 |
388 // FIXME: some senior devs are suggesting that we need to always schedule a
frame here. | 391 m_renderView->frameView()->scheduleAnimation(); |
389 // but we do seem to reach this point in code when frames are unnecessary an
d | |
390 // we need to resolve those instances before initiating a frame here, otherw
ise | |
391 // performance will regress by forcing unnecessary frames. | |
392 } | 392 } |
393 | 393 |
394 void RenderLayerCompositor::updateCompositingLayers() | 394 void RenderLayerCompositor::updateCompositingLayers() |
395 { | 395 { |
396 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::updateCompositingLay
ers"); | 396 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::updateCompositingLay
ers"); |
397 | 397 |
398 // FIXME: We should carefully clean up the awkward early-exit semantics, bal
ancing | 398 // FIXME: We should carefully clean up the awkward early-exit semantics, bal
ancing |
399 // between skipping unnecessary compositing updates and not incorrectly skip
ping | 399 // between skipping unnecessary compositing updates and not incorrectly skip
ping |
400 // necessary updates. | 400 // necessary updates. |
401 | 401 |
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 } else if (graphicsLayer == m_scrollLayer.get()) { | 2695 } else if (graphicsLayer == m_scrollLayer.get()) { |
2696 name = "Frame Scrolling Layer"; | 2696 name = "Frame Scrolling Layer"; |
2697 } else { | 2697 } else { |
2698 ASSERT_NOT_REACHED(); | 2698 ASSERT_NOT_REACHED(); |
2699 } | 2699 } |
2700 | 2700 |
2701 return name; | 2701 return name; |
2702 } | 2702 } |
2703 | 2703 |
2704 } // namespace WebCore | 2704 } // namespace WebCore |
OLD | NEW |