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

Side by Side Diff: sky/engine/core/rendering/style/RenderStyle.cpp

Issue 731863003: Remove CSSCompositing (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: preland Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 return false; 453 return false;
454 } 454 }
455 455
456 bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons t 456 bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons t
457 { 457 {
458 if (position() != StaticPosition && (visual->clip != other.visual->clip || v isual->hasAutoClip != other.visual->hasAutoClip)) 458 if (position() != StaticPosition && (visual->clip != other.visual->clip || v isual->hasAutoClip != other.visual->hasAutoClip))
459 return true; 459 return true;
460 460
461 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { 461 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
462 if (RuntimeEnabledFeatures::cssCompositingEnabled()
463 && (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInher itedData->m_effectiveBlendMode
464 || rareNonInheritedData->m_isolation != other.rareNonInheritedDa ta->m_isolation))
465 return true;
466
467 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask 462 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask
468 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat a->m_maskBoxImage) 463 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat a->m_maskBoxImage)
469 return true; 464 return true;
470 } 465 }
471 466
472 return false; 467 return false;
473 } 468 }
474 469
475 bool RenderStyle::diffNeedsPaintInvalidationObject(const RenderStyle& other) con st 470 bool RenderStyle::diffNeedsPaintInvalidationObject(const RenderStyle& other) con st
476 { 471 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 { 546 {
552 rareInheritedData.access()->quotes = q; 547 rareInheritedData.access()->quotes = q;
553 } 548 }
554 549
555 void RenderStyle::clearCursorList() 550 void RenderStyle::clearCursorList()
556 { 551 {
557 if (rareInheritedData->cursorData) 552 if (rareInheritedData->cursorData)
558 rareInheritedData.access()->cursorData = nullptr; 553 rareInheritedData.access()->cursorData = nullptr;
559 } 554 }
560 555
561 WebBlendMode RenderStyle::blendMode() const
562 {
563 if (RuntimeEnabledFeatures::cssCompositingEnabled())
564 return static_cast<WebBlendMode>(rareNonInheritedData->m_effectiveBlendM ode);
565 return WebBlendModeNormal;
566 }
567
568 void RenderStyle::setBlendMode(WebBlendMode v)
569 {
570 if (RuntimeEnabledFeatures::cssCompositingEnabled())
571 rareNonInheritedData.access()->m_effectiveBlendMode = v;
572 }
573
574 bool RenderStyle::hasBlendMode() const
575 {
576 if (RuntimeEnabledFeatures::cssCompositingEnabled())
577 return static_cast<WebBlendMode>(rareNonInheritedData->m_effectiveBlendM ode) != WebBlendModeNormal;
578 return false;
579 }
580
581 EIsolation RenderStyle::isolation() const
582 {
583 if (RuntimeEnabledFeatures::cssCompositingEnabled())
584 return static_cast<EIsolation>(rareNonInheritedData->m_isolation);
585 return IsolationAuto;
586 }
587
588 void RenderStyle::setIsolation(EIsolation v)
589 {
590 if (RuntimeEnabledFeatures::cssCompositingEnabled())
591 rareNonInheritedData.access()->m_isolation = v;
592 }
593
594 bool RenderStyle::hasIsolation() const
595 {
596 if (RuntimeEnabledFeatures::cssCompositingEnabled())
597 return rareNonInheritedData->m_isolation != IsolationAuto;
598 return false;
599 }
600
601 bool RenderStyle::hasWillChangeCompositingHint() const 556 bool RenderStyle::hasWillChangeCompositingHint() const
602 { 557 {
603 for (size_t i = 0; i < rareNonInheritedData->m_willChange->m_properties.size (); ++i) { 558 for (size_t i = 0; i < rareNonInheritedData->m_willChange->m_properties.size (); ++i) {
604 switch (rareNonInheritedData->m_willChange->m_properties[i]) { 559 switch (rareNonInheritedData->m_willChange->m_properties[i]) {
605 case CSSPropertyOpacity: 560 case CSSPropertyOpacity:
606 case CSSPropertyTransform: 561 case CSSPropertyTransform:
607 case CSSPropertyWebkitTransform: 562 case CSSPropertyWebkitTransform:
608 case CSSPropertyTop: 563 case CSSPropertyTop:
609 case CSSPropertyLeft: 564 case CSSPropertyLeft:
610 case CSSPropertyBottom: 565 case CSSPropertyBottom:
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 // right 1268 // right
1314 radiiSum = radii.topRight().height() + radii.bottomRight().height(); 1269 radiiSum = radii.topRight().height() + radii.bottomRight().height();
1315 if (radiiSum > rect.height()) 1270 if (radiiSum > rect.height())
1316 factor = std::min(rect.height() / radiiSum, factor); 1271 factor = std::min(rect.height() / radiiSum, factor);
1317 1272
1318 ASSERT(factor <= 1); 1273 ASSERT(factor <= 1);
1319 return factor; 1274 return factor;
1320 } 1275 }
1321 1276
1322 } // namespace blink 1277 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/RenderStyle.h ('k') | sky/engine/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698