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

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

Issue 1775493002: Revert of Update Skia's YUV API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/codec/SkJpegCodec.cpp ('k') | src/core/SkImageGenerator.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 2015 Google Inc. 2 * Copyright 2015 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 "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkImage_Base.h" 10 #include "SkImage_Base.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return ctx->textureProvider()->createTexture(desc, SkBudgeted::kYes, rawStar t, 0); 206 return ctx->textureProvider()->createTexture(desc, SkBudgeted::kYes, rawStar t, 0);
207 } 207 }
208 208
209 class Generator_GrYUVProvider : public GrYUVProvider { 209 class Generator_GrYUVProvider : public GrYUVProvider {
210 SkImageGenerator* fGen; 210 SkImageGenerator* fGen;
211 211
212 public: 212 public:
213 Generator_GrYUVProvider(SkImageGenerator* gen) : fGen(gen) {} 213 Generator_GrYUVProvider(SkImageGenerator* gen) : fGen(gen) {}
214 214
215 uint32_t onGetID() override { return fGen->uniqueID(); } 215 uint32_t onGetID() override { return fGen->uniqueID(); }
216 bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override { 216 bool onGetYUVSizes(SkISize sizes[3]) override {
217 return fGen->queryYUV8(sizeInfo, colorSpace); 217 return fGen->getYUV8Planes(sizes, nullptr, nullptr, nullptr);
218 } 218 }
219 bool onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) overrid e { 219 bool onGetYUVPlanes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
220 return fGen->getYUV8Planes(sizeInfo, planes); 220 SkYUVColorSpace* space) override {
221 return fGen->getYUV8Planes(sizes, planes, rowBytes, space);
221 } 222 }
222 }; 223 };
223 224
224 static GrTexture* set_key_and_return(GrTexture* tex, const GrUniqueKey& key) { 225 static GrTexture* set_key_and_return(GrTexture* tex, const GrUniqueKey& key) {
225 if (key.isValid()) { 226 if (key.isValid()) {
226 tex->resourcePriv().setUniqueKey(key); 227 tex->resourcePriv().setUniqueKey(key);
227 } 228 }
228 return tex; 229 return tex;
229 } 230 }
230 231
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 333 }
333 334
334 #else 335 #else
335 336
336 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 337 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
337 const SkImage* client, SkImage::Cach ingHint) { 338 const SkImage* client, SkImage::Cach ingHint) {
338 return nullptr; 339 return nullptr;
339 } 340 }
340 341
341 #endif 342 #endif
OLDNEW
« no previous file with comments | « src/codec/SkJpegCodec.cpp ('k') | src/core/SkImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698