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

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

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fixing bad rebase. Created 5 years, 1 month 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 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 } 287 }
288 288
289 protected: 289 protected:
290 GrTexture* peekOriginalTexture() override { return nullptr; } 290 GrTexture* peekOriginalTexture() override { return nullptr; }
291 291
292 // TODO: consider overriding this, for the case where the underlying generat or might be 292 // TODO: consider overriding this, for the case where the underlying generat or might be
293 // able to efficiently produce a "stretched" texture natively (e.g. pi cture-backed) 293 // able to efficiently produce a "stretched" texture natively (e.g. pi cture-backed)
294 // GrTexture* generateTextureForParams(GrContext*, const SkGrStretch&) ov erride; 294 // GrTexture* generateTextureForParams(GrContext*, const SkGrStretch&) ov erride;
295 295
296 GrTexture* refOriginalTexture(GrContext* ctx) override { 296 GrTexture* refOriginalTexture(GrContext* ctx, const GrTextureParams&) overri de {
297 return fCacher->lockTexture(ctx, fOriginalKey, fClient); 297 return fCacher->lockTexture(ctx, fOriginalKey, fClient);
298 } 298 }
299 299
300 void makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey) over ride { 300 void makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey) over ride {
301 if (fOriginalKey.isValid()) { 301 if (fOriginalKey.isValid()) {
302 MakeCopyKeyFromOrigKey(fOriginalKey, stretch, paramsCopyKey); 302 MakeCopyKeyFromOrigKey(fOriginalKey, stretch, paramsCopyKey);
303 } 303 }
304 } 304 }
305 305
306 void didCacheCopy(const GrUniqueKey& copyKey) override { 306 void didCacheCopy(const GrUniqueKey& copyKey) override {
(...skipping 24 matching lines...) Expand all
331 } 331 }
332 332
333 #else 333 #else
334 334
335 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&, 335 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam s&,
336 const SkImage* client) { 336 const SkImage* client) {
337 return nullptr; 337 return nullptr;
338 } 338 }
339 339
340 #endif 340 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/core/SkMipMap.h » ('j') | src/core/SkMipMap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698