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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 139103009: If a compositing update is declared as needed, scheduleAnimation should be triggered. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed unnecessary foobar Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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: this code needs to be carefully merged with setNeedsCompositingUpd ate.
jamesr 2014/02/11 01:50:14 I don't really understand what this comment is try
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698