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

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

Issue 1323173002: forgot base impl (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 bool SkImage::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dst RowBytes, 47 bool SkImage::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dst RowBytes,
48 int srcX, int srcY) const { 48 int srcX, int srcY) const {
49 SkReadPixelsRec rec(dstInfo, dstPixels, dstRowBytes, srcX, srcY); 49 SkReadPixelsRec rec(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
50 if (!rec.trim(this->width(), this->height())) { 50 if (!rec.trim(this->width(), this->height())) {
51 return false; 51 return false;
52 } 52 }
53 return as_IB(this)->onReadPixels(rec.fInfo, rec.fPixels, rec.fRowBytes, rec. fX, rec.fY); 53 return as_IB(this)->onReadPixels(rec.fInfo, rec.fPixels, rec.fRowBytes, rec. fX, rec.fY);
54 } 54 }
55 55
56 void SkImage::preroll(GrContext* ctx) const {
57 as_IB(this)->onPreroll(ctx);
58 }
59
56 SkShader* SkImage::newShader(SkShader::TileMode tileX, 60 SkShader* SkImage::newShader(SkShader::TileMode tileX,
57 SkShader::TileMode tileY, 61 SkShader::TileMode tileY,
58 const SkMatrix* localMatrix) const { 62 const SkMatrix* localMatrix) const {
59 return as_IB(this)->onNewShader(tileX, tileY, localMatrix); 63 return as_IB(this)->onNewShader(tileX, tileY, localMatrix);
60 } 64 }
61 65
62 SkData* SkImage::encode(SkImageEncoder::Type type, int quality) const { 66 SkData* SkImage::encode(SkImageEncoder::Type type, int quality) const {
63 SkBitmap bm; 67 SkBitmap bm;
64 if (as_IB(this)->getROPixels(&bm)) { 68 if (as_IB(this)->getROPixels(&bm)) {
65 return SkImageEncoder::EncodeData(bm, type, quality); 69 return SkImageEncoder::EncodeData(bm, type, quality);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 306
303 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) { 307 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) {
304 return nullptr; 308 return nullptr;
305 } 309 }
306 310
307 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { 311 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) {
308 return nullptr; 312 return nullptr;
309 } 313 }
310 314
311 #endif 315 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698