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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 1393593002: Convert SkLayerDrawLooper::addLayerOnTop calls to use addLayer instead Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp ('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) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (!color.alpha()) { 207 if (!color.alpha()) {
208 if (shadowMode == DrawShadowOnly) { 208 if (shadowMode == DrawShadowOnly) {
209 // shadow only, but there is no shadow: use an empty draw looper to disable rendering of the source primitive 209 // shadow only, but there is no shadow: use an empty draw looper to disable rendering of the source primitive
210 setDrawLooper(drawLooperBuilder.release()); 210 setDrawLooper(drawLooperBuilder.release());
211 return; 211 return;
212 } 212 }
213 clearDrawLooper(); 213 clearDrawLooper();
214 return; 214 return;
215 } 215 }
216 216
217 drawLooperBuilder->addShadow(offset, blur, color, shadowTransformMode, shado wAlphaMode);
218 if (shadowMode == DrawShadowAndForeground) { 217 if (shadowMode == DrawShadowAndForeground) {
219 drawLooperBuilder->addUnmodifiedContent(); 218 drawLooperBuilder->addUnmodifiedContent();
220 } 219 }
220 drawLooperBuilder->addShadow(offset, blur, color, shadowTransformMode, shado wAlphaMode);
221 setDrawLooper(drawLooperBuilder.release()); 221 setDrawLooper(drawLooperBuilder.release());
222 } 222 }
223 223
224 void GraphicsContext::setDrawLooper(PassOwnPtr<DrawLooperBuilder> drawLooperBuil der) 224 void GraphicsContext::setDrawLooper(PassOwnPtr<DrawLooperBuilder> drawLooperBuil der)
225 { 225 {
226 if (contextDisabled()) 226 if (contextDisabled())
227 return; 227 return;
228 228
229 mutableState()->setDrawLooper(drawLooperBuilder->detachDrawLooper()); 229 mutableState()->setDrawLooper(drawLooperBuilder->detachDrawLooper());
230 } 230 }
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 static const SkPMColor colors[] = { 1361 static const SkPMColor colors[] = {
1362 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1362 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1363 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1363 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1364 }; 1364 };
1365 1365
1366 return colors[index]; 1366 return colors[index];
1367 } 1367 }
1368 #endif 1368 #endif
1369 1369
1370 } // namespace blink 1370 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698