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

Side by Side Diff: Source/platform/graphics/LazyDecodingPixelRef.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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 LazyDecodingPixelRef::~LazyDecodingPixelRef() 45 LazyDecodingPixelRef::~LazyDecodingPixelRef()
46 { 46 {
47 } 47 }
48 48
49 SkData* LazyDecodingPixelRef::onRefEncodedData() 49 SkData* LazyDecodingPixelRef::onRefEncodedData()
50 { 50 {
51 // If the image has been clipped or scaled, do not return the original encod ed data, since 51 // If the image has been clipped or scaled, do not return the original encod ed data, since
52 // on playback it will not be known how the clipping/scaling was done. 52 // on playback it will not be known how the clipping/scaling was done.
53 RefPtr<SharedBuffer> buffer = 0; 53 RefPtr<SharedBuffer> buffer = nullptr;
54 bool allDataReceived = false; 54 bool allDataReceived = false;
55 m_frameGenerator->copyData(&buffer, &allDataReceived); 55 m_frameGenerator->copyData(&buffer, &allDataReceived);
56 if (buffer && allDataReceived) { 56 if (buffer && allDataReceived) {
57 SkData* skdata = SkData::NewWithCopy((void*)buffer->data(), buffer->size ()); 57 SkData* skdata = SkData::NewWithCopy((void*)buffer->data(), buffer->size ());
58 return skdata; 58 return skdata;
59 } 59 }
60 return 0; 60 return 0;
61 } 61 }
62 62
63 bool LazyDecodingPixelRef::onNewLockPixels(LockRec* rec) 63 bool LazyDecodingPixelRef::onNewLockPixels(LockRec* rec)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 void LazyDecodingPixelRef::Decode() 117 void LazyDecodingPixelRef::Decode()
118 { 118 {
119 lockPixels(); 119 lockPixels();
120 unlockPixels(); 120 unlockPixels();
121 } 121 }
122 122
123 123
124 } // namespace blink 124 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageSource.cpp ('k') | Source/platform/graphics/filters/FELighting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698