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

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

Issue 234833003: Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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/image/SkImagePriv.cpp ('k') | src/image/SkSurface_Picture.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void SkImage_Gpu::onDrawRectToRect(SkCanvas* canvas, const SkRect* src, const Sk Rect& dst, 52 void SkImage_Gpu::onDrawRectToRect(SkCanvas* canvas, const SkRect* src, const Sk Rect& dst,
53 const SkPaint* paint) { 53 const SkPaint* paint) {
54 canvas->drawBitmapRectToRect(fBitmap, src, dst, paint); 54 canvas->drawBitmapRectToRect(fBitmap, src, dst, paint);
55 } 55 }
56 56
57 GrTexture* SkImage_Gpu::onGetTexture() { 57 GrTexture* SkImage_Gpu::onGetTexture() {
58 return fBitmap.getTexture(); 58 return fBitmap.getTexture();
59 } 59 }
60 60
61 bool SkImage_Gpu::getROPixels(SkBitmap* dst) const { 61 bool SkImage_Gpu::getROPixels(SkBitmap* dst) const {
62 return fBitmap.copyTo(dst, kN32_SkColorType); 62 return fBitmap.copyTo(dst, kPMColor_SkColorType);
63 } 63 }
64 64
65 /////////////////////////////////////////////////////////////////////////////// 65 ///////////////////////////////////////////////////////////////////////////////
66 66
67 SkImage* SkImage::NewTexture(const SkBitmap& bitmap) { 67 SkImage* SkImage::NewTexture(const SkBitmap& bitmap) {
68 if (NULL == bitmap.getTexture()) { 68 if (NULL == bitmap.getTexture()) {
69 return NULL; 69 return NULL;
70 } 70 }
71 71
72 return SkNEW_ARGS(SkImage_Gpu, (bitmap)); 72 return SkNEW_ARGS(SkImage_Gpu, (bitmap));
73 } 73 }
74 74
75 GrTexture* SkTextureImageGetTexture(SkImage* image) { 75 GrTexture* SkTextureImageGetTexture(SkImage* image) {
76 return ((SkImage_Gpu*)image)->getTexture(); 76 return ((SkImage_Gpu*)image)->getTexture();
77 } 77 }
OLDNEW
« no previous file with comments | « src/image/SkImagePriv.cpp ('k') | src/image/SkSurface_Picture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698