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

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

Issue 2011783002: Rename OwnPtr::clear() to reset() in platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 { 174 {
175 if (contextDisabled()) 175 if (contextDisabled())
176 return; 176 return;
177 177
178 OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create(); 178 OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create();
179 if (!color.alpha()) { 179 if (!color.alpha()) {
180 // When shadow-only but there is no shadow, we use an empty draw looper 180 // When shadow-only but there is no shadow, we use an empty draw looper
181 // to disable rendering of the source primitive. When not shadow-only, we 181 // to disable rendering of the source primitive. When not shadow-only, we
182 // clear the looper. 182 // clear the looper.
183 if (shadowMode != DrawShadowOnly) 183 if (shadowMode != DrawShadowOnly)
184 drawLooperBuilder.clear(); 184 drawLooperBuilder.reset();
185 185
186 setDrawLooper(std::move(drawLooperBuilder)); 186 setDrawLooper(std::move(drawLooperBuilder));
187 return; 187 return;
188 } 188 }
189 189
190 drawLooperBuilder->addShadow(offset, blur, color, shadowTransformMode, shado wAlphaMode); 190 drawLooperBuilder->addShadow(offset, blur, color, shadowTransformMode, shado wAlphaMode);
191 if (shadowMode == DrawShadowAndForeground) { 191 if (shadowMode == DrawShadowAndForeground) {
192 drawLooperBuilder->addUnmodifiedContent(); 192 drawLooperBuilder->addUnmodifiedContent();
193 } 193 }
194 setDrawLooper(std::move(drawLooperBuilder)); 194 setDrawLooper(std::move(drawLooperBuilder));
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 static const SkPMColor colors[] = { 1371 static const SkPMColor colors[] = {
1372 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1372 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1373 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1373 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1374 }; 1374 };
1375 1375
1376 return colors[index]; 1376 return colors[index];
1377 } 1377 }
1378 #endif 1378 #endif
1379 1379
1380 } // namespace blink 1380 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698