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

Side by Side Diff: Source/platform/graphics/Gradient.cpp

Issue 476683002: Cleanup namespace usage in platform/graphics/[G-S]* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 m_gradient = adoptRef(SkGradientShader::CreateLinear(pts, colors.data(), pos.data(), static_cast<int>(countUsed), tile, shouldDrawInPMColorSpace, &local Matrix)); 258 m_gradient = adoptRef(SkGradientShader::CreateLinear(pts, colors.data(), pos.data(), static_cast<int>(countUsed), tile, shouldDrawInPMColorSpace, &local Matrix));
259 } 259 }
260 260
261 if (!m_gradient) { 261 if (!m_gradient) {
262 // use last color, since our "geometry" was degenerate (e.g. radius==0) 262 // use last color, since our "geometry" was degenerate (e.g. radius==0)
263 m_gradient = adoptRef(new SkColorShader(colors[countUsed - 1])); 263 m_gradient = adoptRef(new SkColorShader(colors[countUsed - 1]));
264 } 264 }
265 return m_gradient.get(); 265 return m_gradient.get();
266 } 266 }
267 267
268 } //namespace 268 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/GeneratedImage.cpp ('k') | Source/platform/graphics/GradientGeneratedImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698