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

Side by Side Diff: Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { 60 {
61 } 61 }
62 62
63 SkiaImageFilterBuilder::~SkiaImageFilterBuilder() 63 SkiaImageFilterBuilder::~SkiaImageFilterBuilder()
64 { 64 {
65 } 65 }
66 66
67 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::build(FilterEffect* effect, Co lorSpace colorSpace) 67 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::build(FilterEffect* effect, Co lorSpace colorSpace)
68 { 68 {
69 if (!effect) 69 if (!effect)
70 return 0; 70 return nullptr;
71 71
72 FilterColorSpacePair key(effect, colorSpace); 72 FilterColorSpacePair key(effect, colorSpace);
73 FilterBuilderHashMap::iterator it = m_map.find(key); 73 FilterBuilderHashMap::iterator it = m_map.find(key);
74 if (it != m_map.end()) { 74 if (it != m_map.end()) {
75 return it->value; 75 return it->value;
76 } else { 76 } else {
77 // Note that we may still need the color transform even if the filter is null 77 // Note that we may still need the color transform even if the filter is null
78 RefPtr<SkImageFilter> origFilter = effect->createImageFilter(this); 78 RefPtr<SkImageFilter> origFilter = effect->createImageFilter(this);
79 RefPtr<SkImageFilter> filter = transformColorSpace(origFilter.get(), eff ect->operatingColorSpace(), colorSpace); 79 RefPtr<SkImageFilter> filter = transformColorSpace(origFilter.get(), eff ect->operatingColorSpace(), colorSpace);
80 m_map.set(key, filter); 80 m_map.set(key, filter);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 return true; 205 return true;
206 } 206 }
207 207
208 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::buildResize(float scaleX, floa t scaleY, SkImageFilter* input) 208 PassRefPtr<SkImageFilter> SkiaImageFilterBuilder::buildResize(float scaleX, floa t scaleY, SkImageFilter* input)
209 { 209 {
210 return adoptRef(new SkResizeImageFilter(scaleX, scaleY, SkPaint::kHigh_Filte rLevel, input)); 210 return adoptRef(new SkResizeImageFilter(scaleX, scaleY, SkPaint::kHigh_Filte rLevel, input));
211 } 211 }
212 212
213 }; 213 };
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FilterOperation.h ('k') | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698