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

Side by Side Diff: src/image/SkSurface_Raster.cpp

Issue 2066903003: Document SkSurface::MakeRaster's memory initialization (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review Created 4 years, 5 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 | « include/core/SkSurface.h ('k') | tests/SurfaceTest.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewZeroed(info, rowBytes, null ptr)); 199 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewZeroed(info, rowBytes, null ptr));
200 if (nullptr == pr.get()) { 200 if (nullptr == pr.get()) {
201 return nullptr; 201 return nullptr;
202 } 202 }
203 if (rowBytes) { 203 if (rowBytes) {
204 SkASSERT(pr->rowBytes() == rowBytes); 204 SkASSERT(pr->rowBytes() == rowBytes);
205 } 205 }
206 return sk_make_sp<SkSurface_Raster>(pr, props); 206 return sk_make_sp<SkSurface_Raster>(pr, props);
207 } 207 }
208
209 sk_sp<SkSurface> SkSurface::MakeRaster(const SkImageInfo& info, const SkSurfaceP rops* props) {
210 return MakeRaster(info, 0, props);
211 }
OLDNEW
« no previous file with comments | « include/core/SkSurface.h ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698