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

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

Issue 1716523002: Update Skia's YUV API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase 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 onGetYUVSizes(SkISize sizes[3]) override { 216 bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override {
217 return fGen->getYUV8Planes(sizes, nullptr, nullptr, nullptr); 217 return fGen->queryYUV8(sizeInfo, colorSpace);
218 } 218 }
219 bool onGetYUVPlanes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], 219 bool onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) overrid e {
220 SkYUVColorSpace* space) override { 220 return fGen->getYUV8Planes(sizeInfo, planes);
221 return fGen->getYUV8Planes(sizes, planes, rowBytes, space);
222 } 221 }
223 }; 222 };
224 223
225 static GrTexture* set_key_and_return(GrTexture* tex, const GrUniqueKey& key) { 224 static GrTexture* set_key_and_return(GrTexture* tex, const GrUniqueKey& key) {
226 if (key.isValid()) { 225 if (key.isValid()) {
227 tex->resourcePriv().setUniqueKey(key); 226 tex->resourcePriv().setUniqueKey(key);
228 } 227 }
229 return tex; 228 return tex;
230 } 229 }
231 230
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 332 }
334 333
335 #else 334 #else
336 335
337 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 336 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
338 const SkImage* client, SkImage::Cach ingHint) { 337 const SkImage* client, SkImage::Cach ingHint) {
339 return nullptr; 338 return nullptr;
340 } 339 }
341 340
342 #endif 341 #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