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

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

Issue 358893002: Use newImageSnapshot() to get an image from a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrections Created 6 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 | « Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/Image.h » ('j') | 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void GraphicsContext::setStrokePattern(PassRefPtr<Pattern> pattern) 243 void GraphicsContext::setStrokePattern(PassRefPtr<Pattern> pattern)
244 { 244 {
245 if (contextDisabled()) 245 if (contextDisabled())
246 return; 246 return;
247 247
248 ASSERT(pattern); 248 ASSERT(pattern);
249 if (!pattern) { 249 if (!pattern) {
250 setStrokeColor(Color::black); 250 setStrokeColor(Color::black);
251 return; 251 return;
252 } 252 }
253
253 mutableState()->setStrokePattern(pattern); 254 mutableState()->setStrokePattern(pattern);
254 } 255 }
255 256
256 void GraphicsContext::setStrokeGradient(PassRefPtr<Gradient> gradient) 257 void GraphicsContext::setStrokeGradient(PassRefPtr<Gradient> gradient)
257 { 258 {
258 if (contextDisabled()) 259 if (contextDisabled())
259 return; 260 return;
260 261
261 ASSERT(gradient); 262 ASSERT(gradient);
262 if (!gradient) { 263 if (!gradient) {
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 // FIXME: This is to not break tests (it results in the filter bitmap fl ag 2012 // FIXME: This is to not break tests (it results in the filter bitmap fl ag
2012 // being set to true). We need to decide if we respect InterpolationNone 2013 // being set to true). We need to decide if we respect InterpolationNone
2013 // being returned from computeInterpolationQuality. 2014 // being returned from computeInterpolationQuality.
2014 resampling = InterpolationLow; 2015 resampling = InterpolationLow;
2015 } 2016 }
2016 resampling = limitInterpolationQuality(this, resampling); 2017 resampling = limitInterpolationQuality(this, resampling);
2017 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); 2018 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
2018 } 2019 }
2019 2020
2020 } // namespace blink 2021 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/Canvas2DLayerBridge.cpp ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698