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

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

Issue 1403313003: Remove params from Cacherator_GrTextureMaker (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: correct_key Created 5 years, 2 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/SkImageCacherator.cpp ('k') | src/core/SkPictureImageGenerator.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 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 #include "SkNextID.h" 9 #include "SkNextID.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // In order to maintain compatibility with clients that implemented the orig inal 97 // In order to maintain compatibility with clients that implemented the orig inal
98 // onGetYUV8Planes interface, we assume that the color space is JPEG. 98 // onGetYUV8Planes interface, we assume that the color space is JPEG.
99 // TODO(rileya): remove this and the old onGetYUV8Planes once clients switch over to 99 // TODO(rileya): remove this and the old onGetYUV8Planes once clients switch over to
100 // the new interface. 100 // the new interface.
101 if (colorSpace) { 101 if (colorSpace) {
102 *colorSpace = kJPEG_SkYUVColorSpace; 102 *colorSpace = kJPEG_SkYUVColorSpace;
103 } 103 }
104 return this->onGetYUV8Planes(sizes, planes, rowBytes); 104 return this->onGetYUV8Planes(sizes, planes, rowBytes);
105 } 105 }
106 106
107 GrTexture* SkImageGenerator::generateTexture(GrContext* ctx, const GrTexturePara ms& params, 107 GrTexture* SkImageGenerator::generateTexture(GrContext* ctx, const SkIRect* subs et) {
108 const SkIRect* subset) {
109 if (subset && !SkIRect::MakeWH(fInfo.width(), fInfo.height()).contains(*subs et)) { 108 if (subset && !SkIRect::MakeWH(fInfo.width(), fInfo.height()).contains(*subs et)) {
110 return nullptr; 109 return nullptr;
111 } 110 }
112 return this->onGenerateTexture(ctx, params, subset); 111 return this->onGenerateTexture(ctx, subset);
113 } 112 }
114 113
115 //////////////////////////////////////////////////////////////////////////////// ///////////// 114 //////////////////////////////////////////////////////////////////////////////// /////////////
116 115
117 SkData* SkImageGenerator::onRefEncodedData() { 116 SkData* SkImageGenerator::onRefEncodedData() {
118 return nullptr; 117 return nullptr;
119 } 118 }
120 119
121 bool SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, size_t rb , 120 bool SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, size_t rb ,
122 SkPMColor* colors, int* colorCount) { 121 SkPMColor* colors, int* colorCount) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (nullptr == data) { 214 if (nullptr == data) {
216 return nullptr; 215 return nullptr;
217 } 216 }
218 if (gFactory) { 217 if (gFactory) {
219 if (SkImageGenerator* generator = gFactory(data)) { 218 if (SkImageGenerator* generator = gFactory(data)) {
220 return generator; 219 return generator;
221 } 220 }
222 } 221 }
223 return SkImageGenerator::NewFromEncodedImpl(data); 222 return SkImageGenerator::NewFromEncodedImpl(data);
224 } 223 }
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698