| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 : m_needsDisplay(false) | 59 : m_needsDisplay(false) |
| 60 , m_layerId(s_nextLayerId++) | 60 , m_layerId(s_nextLayerId++) |
| 61 , m_parent(0) | 61 , m_parent(0) |
| 62 , m_layerAnimationController(CCLayerAnimationController::create(this)) | 62 , m_layerAnimationController(CCLayerAnimationController::create(this)) |
| 63 , m_scrollable(false) | 63 , m_scrollable(false) |
| 64 , m_shouldScrollOnMainThread(false) | 64 , m_shouldScrollOnMainThread(false) |
| 65 , m_haveWheelEventHandlers(false) | 65 , m_haveWheelEventHandlers(false) |
| 66 , m_nonFastScrollableRegionChanged(false) | 66 , m_nonFastScrollableRegionChanged(false) |
| 67 , m_anchorPoint(0.5, 0.5) | 67 , m_anchorPoint(0.5, 0.5) |
| 68 , m_backgroundColor(0, 0, 0, 0) | 68 , m_backgroundColor(0, 0, 0, 0) |
| 69 , m_backgroundCoversViewport(false) | |
| 70 , m_debugBorderWidth(0) | 69 , m_debugBorderWidth(0) |
| 71 , m_opacity(1.0) | 70 , m_opacity(1.0) |
| 72 , m_anchorPointZ(0) | 71 , m_anchorPointZ(0) |
| 73 , m_isDrawable(false) | 72 , m_isDrawable(false) |
| 74 , m_masksToBounds(false) | 73 , m_masksToBounds(false) |
| 75 , m_opaque(false) | 74 , m_opaque(false) |
| 76 , m_doubleSided(true) | 75 , m_doubleSided(true) |
| 77 , m_usesLayerClipping(false) | 76 , m_usesLayerClipping(false) |
| 78 , m_isNonCompositedContent(false) | 77 , m_isNonCompositedContent(false) |
| 79 , m_preserves3D(false) | 78 , m_preserves3D(false) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 262 } |
| 264 | 263 |
| 265 void LayerChromium::setBackgroundColor(const Color& backgroundColor) | 264 void LayerChromium::setBackgroundColor(const Color& backgroundColor) |
| 266 { | 265 { |
| 267 if (m_backgroundColor == backgroundColor) | 266 if (m_backgroundColor == backgroundColor) |
| 268 return; | 267 return; |
| 269 m_backgroundColor = backgroundColor; | 268 m_backgroundColor = backgroundColor; |
| 270 setNeedsCommit(); | 269 setNeedsCommit(); |
| 271 } | 270 } |
| 272 | 271 |
| 273 void LayerChromium::setBackgroundCoversViewport(bool backgroundCoversViewport) | |
| 274 { | |
| 275 if (m_backgroundCoversViewport == backgroundCoversViewport) | |
| 276 return; | |
| 277 m_backgroundCoversViewport = backgroundCoversViewport; | |
| 278 setNeedsCommit(); | |
| 279 } | |
| 280 | |
| 281 void LayerChromium::setMasksToBounds(bool masksToBounds) | 272 void LayerChromium::setMasksToBounds(bool masksToBounds) |
| 282 { | 273 { |
| 283 if (m_masksToBounds == masksToBounds) | 274 if (m_masksToBounds == masksToBounds) |
| 284 return; | 275 return; |
| 285 m_masksToBounds = masksToBounds; | 276 m_masksToBounds = masksToBounds; |
| 286 setNeedsCommit(); | 277 setNeedsCommit(); |
| 287 } | 278 } |
| 288 | 279 |
| 289 void LayerChromium::setMaskLayer(LayerChromium* maskLayer) | 280 void LayerChromium::setMaskLayer(LayerChromium* maskLayer) |
| 290 { | 281 { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 m_needsDisplay = true; | 437 m_needsDisplay = true; |
| 447 | 438 |
| 448 setNeedsCommit(); | 439 setNeedsCommit(); |
| 449 } | 440 } |
| 450 | 441 |
| 451 void LayerChromium::pushPropertiesTo(CCLayerImpl* layer) | 442 void LayerChromium::pushPropertiesTo(CCLayerImpl* layer) |
| 452 { | 443 { |
| 453 layer->setAnchorPoint(m_anchorPoint); | 444 layer->setAnchorPoint(m_anchorPoint); |
| 454 layer->setAnchorPointZ(m_anchorPointZ); | 445 layer->setAnchorPointZ(m_anchorPointZ); |
| 455 layer->setBackgroundColor(m_backgroundColor); | 446 layer->setBackgroundColor(m_backgroundColor); |
| 456 layer->setBackgroundCoversViewport(m_backgroundCoversViewport); | |
| 457 layer->setBounds(m_bounds); | 447 layer->setBounds(m_bounds); |
| 458 layer->setContentBounds(contentBounds()); | 448 layer->setContentBounds(contentBounds()); |
| 459 layer->setDebugBorderColor(m_debugBorderColor); | 449 layer->setDebugBorderColor(m_debugBorderColor); |
| 460 layer->setDebugBorderWidth(m_debugBorderWidth); | 450 layer->setDebugBorderWidth(m_debugBorderWidth); |
| 461 layer->setDebugName(m_debugName.isolatedCopy()); // We have to use isolatedC
opy() here to safely pass ownership to another thread. | 451 layer->setDebugName(m_debugName.isolatedCopy()); // We have to use isolatedC
opy() here to safely pass ownership to another thread. |
| 462 layer->setDoubleSided(m_doubleSided); | 452 layer->setDoubleSided(m_doubleSided); |
| 463 layer->setDrawsContent(drawsContent()); | 453 layer->setDrawsContent(drawsContent()); |
| 464 if (CCProxy::hasImplThread()) { | 454 if (CCProxy::hasImplThread()) { |
| 465 // Since FilterOperations contains a vector of RefPtrs, we must deep cop
y the filters. | 455 // Since FilterOperations contains a vector of RefPtrs, we must deep cop
y the filters. |
| 466 FilterOperations filtersCopy; | 456 FilterOperations filtersCopy; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 { | 614 { |
| 625 return m_layerAnimationController->hasActiveAnimation(); | 615 return m_layerAnimationController->hasActiveAnimation(); |
| 626 } | 616 } |
| 627 | 617 |
| 628 void LayerChromium::notifyAnimationStarted(const CCAnimationStartedEvent& event,
double wallClockTime) | 618 void LayerChromium::notifyAnimationStarted(const CCAnimationStartedEvent& event,
double wallClockTime) |
| 629 { | 619 { |
| 630 m_layerAnimationController->notifyAnimationStarted(event); | 620 m_layerAnimationController->notifyAnimationStarted(event); |
| 631 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); | 621 m_layerAnimationDelegate->notifyAnimationStarted(wallClockTime); |
| 632 } | 622 } |
| 633 | 623 |
| 624 Region LayerChromium::visibleContentOpaqueRegion() const |
| 625 { |
| 626 if (opaque()) |
| 627 return visibleLayerRect(); |
| 628 return Region(); |
| 629 } |
| 630 |
| 634 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*) | 631 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*) |
| 635 { | 632 { |
| 636 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort LayerChromiums. | 633 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort LayerChromiums. |
| 637 } | 634 } |
| 638 | 635 |
| 639 } | 636 } |
| 640 #endif // USE(ACCELERATED_COMPOSITING) | 637 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |