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

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

Issue 688233002: Remove writing mode code from the linebox tree. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT 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
« no previous file with comments | « sky/engine/core/rendering/style/ShadowList.h ('k') | no next file » | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (!fromShadow) 91 if (!fromShadow)
92 fromShadow = toShadow->style() == Inset ? &defaultInsetShadowData : &defaultShadowData; 92 fromShadow = toShadow->style() == Inset ? &defaultInsetShadowData : &defaultShadowData;
93 else if (!toShadow) 93 else if (!toShadow)
94 toShadow = fromShadow->style() == Inset ? &defaultInsetShadowData : &defaultShadowData; 94 toShadow = fromShadow->style() == Inset ? &defaultInsetShadowData : &defaultShadowData;
95 shadows.append(toShadow->blend(*fromShadow, progress)); 95 shadows.append(toShadow->blend(*fromShadow, progress));
96 } 96 }
97 97
98 return ShadowList::adopt(shadows); 98 return ShadowList::adopt(shadows);
99 } 99 }
100 100
101 PassOwnPtr<DrawLooperBuilder> ShadowList::createDrawLooper(DrawLooperBuilder::Sh adowAlphaMode alphaMode, bool isHorizontal) const 101 PassOwnPtr<DrawLooperBuilder> ShadowList::createDrawLooper(DrawLooperBuilder::Sh adowAlphaMode alphaMode) const
102 { 102 {
103 OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create(); 103 OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
104 for (size_t i = shadows().size(); i--; ) { 104 for (size_t i = shadows().size(); i--; ) {
105 const ShadowData& shadow = shadows()[i]; 105 const ShadowData& shadow = shadows()[i];
106 float shadowX = isHorizontal ? shadow.x() : shadow.y(); 106 drawLooperBuilder->addShadow(FloatSize(shadow.x(), shadow.y()), shadow.b lur(), shadow.color(),
107 float shadowY = isHorizontal ? shadow.y() : -shadow.x();
108 drawLooperBuilder->addShadow(FloatSize(shadowX, shadowY), shadow.blur(), shadow.color(),
109 DrawLooperBuilder::ShadowRespectsTransforms, alphaMode); 107 DrawLooperBuilder::ShadowRespectsTransforms, alphaMode);
110 } 108 }
111 drawLooperBuilder->addUnmodifiedContent(); 109 drawLooperBuilder->addUnmodifiedContent();
112 return drawLooperBuilder.release(); 110 return drawLooperBuilder.release();
113 } 111 }
114 112
115 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/ShadowList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698