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

Side by Side Diff: src/image/SkImage_Gpu.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/gpu/gl/win/GrGLCreateNativeInterface_win.cpp ('k') | src/image/SkSurface.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 "SkImage_Base.h" 8 #include "SkImage_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 27 matching lines...) Expand all
38 SkBitmap fBitmap; 38 SkBitmap fBitmap;
39 39
40 typedef SkImage_Base INHERITED; 40 typedef SkImage_Base INHERITED;
41 }; 41 };
42 42
43 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
44 44
45 SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap) 45 SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap)
46 : INHERITED(bitmap.width(), bitmap.height()) 46 : INHERITED(bitmap.width(), bitmap.height())
47 , fBitmap(bitmap) { 47 , fBitmap(bitmap) {
48 SkASSERT(NULL != fBitmap.getTexture()); 48 SkASSERT(fBitmap.getTexture());
49 } 49 }
50 50
51 SkImage_Gpu::~SkImage_Gpu() { 51 SkImage_Gpu::~SkImage_Gpu() {
52 } 52 }
53 53
54 SkShader* SkImage_Gpu::onNewShader(SkShader::TileMode tileX, 54 SkShader* SkImage_Gpu::onNewShader(SkShader::TileMode tileX,
55 SkShader::TileMode tileY, 55 SkShader::TileMode tileY,
56 const SkMatrix* localMatrix) const 56 const SkMatrix* localMatrix) const
57 { 57 {
58 return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, localMatrix); 58 return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, localMatrix);
(...skipping 26 matching lines...) Expand all
85 if (NULL == bitmap.getTexture()) { 85 if (NULL == bitmap.getTexture()) {
86 return NULL; 86 return NULL;
87 } 87 }
88 88
89 return SkNEW_ARGS(SkImage_Gpu, (bitmap)); 89 return SkNEW_ARGS(SkImage_Gpu, (bitmap));
90 } 90 }
91 91
92 GrTexture* SkTextureImageGetTexture(SkImage* image) { 92 GrTexture* SkTextureImageGetTexture(SkImage* image) {
93 return ((SkImage_Gpu*)image)->getTexture(); 93 return ((SkImage_Gpu*)image)->getTexture();
94 } 94 }
OLDNEW
« no previous file with comments | « src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698