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

Side by Side Diff: src/core/SkMallocPixelRef.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 | « src/core/SkImageGenerator.cpp ('k') | src/core/SkMaskGamma.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 2011 Google Inc. 2 * Copyright 2011 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 "SkMallocPixelRef.h" 8 #include "SkMallocPixelRef.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 12 matching lines...) Expand all
23 return false; 23 return false;
24 } 24 }
25 25
26 // these seem like good checks, but currently we have (at least) tests 26 // these seem like good checks, but currently we have (at least) tests
27 // that expect the pixelref to succeed even when there is a mismatch 27 // that expect the pixelref to succeed even when there is a mismatch
28 // with colortables. fix? 28 // with colortables. fix?
29 #if 0 29 #if 0
30 if (kIndex8_SkColorType == info.fColorType && NULL == ctable) { 30 if (kIndex8_SkColorType == info.fColorType && NULL == ctable) {
31 return false; 31 return false;
32 } 32 }
33 if (kIndex8_SkColorType != info.fColorType && NULL != ctable) { 33 if (kIndex8_SkColorType != info.fColorType && ctable) {
34 return false; 34 return false;
35 } 35 }
36 #endif 36 #endif
37 return true; 37 return true;
38 } 38 }
39 39
40 SkMallocPixelRef* SkMallocPixelRef::NewDirect(const SkImageInfo& info, 40 SkMallocPixelRef* SkMallocPixelRef::NewDirect(const SkImageInfo& info,
41 void* addr, 41 void* addr,
42 size_t rowBytes, 42 size_t rowBytes,
43 SkColorTable* ctable) { 43 SkColorTable* ctable) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 size_t SkMallocPixelRef::getAllocatedSizeInBytes() const { 198 size_t SkMallocPixelRef::getAllocatedSizeInBytes() const {
199 return this->info().getSafeSize(fRB); 199 return this->info().getSafeSize(fRB);
200 } 200 }
201 201
202 /////////////////////////////////////////////////////////////////////////////// 202 ///////////////////////////////////////////////////////////////////////////////
203 203
204 SkPixelRef* SkMallocPixelRef::PRFactory::create(const SkImageInfo& info, size_t rowBytes, 204 SkPixelRef* SkMallocPixelRef::PRFactory::create(const SkImageInfo& info, size_t rowBytes,
205 SkColorTable* ctable) { 205 SkColorTable* ctable) {
206 return SkMallocPixelRef::NewAllocate(info, rowBytes, ctable); 206 return SkMallocPixelRef::NewAllocate(info, rowBytes, ctable);
207 } 207 }
OLDNEW
« no previous file with comments | « src/core/SkImageGenerator.cpp ('k') | src/core/SkMaskGamma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698