1 // ========================================================================== 2 // Project: SproutCore - JavaScript Application Framework 3 // Copyright: ©2006-2011 Strobe Inc. and contributors. 4 // Portions ©2008-2011 Apple Inc. All rights reserved. 5 // License: Licensed under MIT license (see license.js) 6 // ========================================================================== 7 8 sc_require("views/view"); 9 sc_require("views/view/layout"); 10 sc_require("views/view/layout_style"); 11 12 SC.View.reopen({ 13 14 /** 15 Setting wantsAcceleratedLayer to YES will use transforms to move the 16 layer when available. On some platforms transforms are hardware accelerated. 17 */ 18 wantsAcceleratedLayer: NO, 19 20 /** 21 Specifies whether transforms can be used to move the layer. 22 */ 23 hasAcceleratedLayer: function () { 24 return (SC.platform.supportsCSSTransforms && this.get('wantsAcceleratedLayer') && this.get('isFixedLayout')); 25 }.property('wantsAcceleratedLayer', 'isFixedLayout').cacheable() 26 27 }); 28