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

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

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/SkCanvas.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 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 static GrTexture* load_compressed_into_texture(GrContext* ctx, SkData* data, GrS urfaceDesc desc) { 197 static GrTexture* load_compressed_into_texture(GrContext* ctx, SkData* data, GrS urfaceDesc desc) {
198 const void* rawStart; 198 const void* rawStart;
199 GrPixelConfig config = GrIsCompressedTextureDataSupported(ctx, data, desc.fW idth, desc.fHeight, 199 GrPixelConfig config = GrIsCompressedTextureDataSupported(ctx, data, desc.fW idth, desc.fHeight,
200 &rawStart); 200 &rawStart);
201 if (kUnknown_GrPixelConfig == config) { 201 if (kUnknown_GrPixelConfig == config) {
202 return nullptr; 202 return nullptr;
203 } 203 }
204 204
205 desc.fConfig = config; 205 desc.fConfig = config;
206 return ctx->textureProvider()->createTexture(desc, SkBudgeted::kYes, rawStar t, 0); 206 return ctx->textureProvider()->createTexture(desc, true, rawStart, 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 onGetYUVSizes(SkISize sizes[3]) override {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 #else 327 #else
328 328
329 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 329 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
330 const SkImage* client, SkImage::Cach ingHint) { 330 const SkImage* client, SkImage::Cach ingHint) {
331 return nullptr; 331 return nullptr;
332 } 332 }
333 333
334 #endif 334 #endif
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698