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

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

Issue 1240093004: SkPictureImageGenerator (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: added GM Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 9
10 #include "SkPictureImageGenerator.h"
11
10 bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r owBytes, 12 bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r owBytes,
11 SkPMColor ctable[], int* ctableCount) { 13 SkPMColor ctable[], int* ctableCount) {
12 if (kUnknown_SkColorType == info.colorType()) { 14 if (kUnknown_SkColorType == info.colorType()) {
13 return false; 15 return false;
14 } 16 }
15 if (NULL == pixels) { 17 if (NULL == pixels) {
16 return false; 18 return false;
17 } 19 }
18 if (rowBytes < info.minRowBytes()) { 20 if (rowBytes < info.minRowBytes()) {
19 return false; 21 return false;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (NULL == data) { 151 if (NULL == data) {
150 return NULL; 152 return NULL;
151 } 153 }
152 if (gFactory) { 154 if (gFactory) {
153 if (SkImageGenerator* generator = gFactory(data)) { 155 if (SkImageGenerator* generator = gFactory(data)) {
154 return generator; 156 return generator;
155 } 157 }
156 } 158 }
157 return SkImageGenerator::NewFromEncodedImpl(data); 159 return SkImageGenerator::NewFromEncodedImpl(data);
158 } 160 }
161
162 SkImageGenerator* SkImageGenerator::NewFromPicture(const SkISize& size, const Sk Picture* picture,
163 const SkMatrix* matrix, const SkPaint* paint) {
164 return SkPictureImageGenerator::Create(size, picture, matrix, paint);
165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698