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

Side by Side Diff: include/core/SkImage.h

Issue 2227323002: Revert of Store mipmap levels in deferred texture image (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « gm/deferredtextureimagedata.cpp ('k') | src/image/SkImage.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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkImage_DEFINED 8 #ifndef SkImage_DEFINED
9 #define SkImage_DEFINED 9 #define SkImage_DEFINED
10 10
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 * to create deferred texture data for this image (or zero if this is an ina ppropriate 389 * to create deferred texture data for this image (or zero if this is an ina ppropriate
390 * candidate). The buffer allocated by the client should be 8 byte aligned. 390 * candidate). The buffer allocated by the client should be 8 byte aligned.
391 * 391 *
392 * When buffer is not null this fills in the deferred texture data for this image in the 392 * When buffer is not null this fills in the deferred texture data for this image in the
393 * provided buffer (assuming this is an appropriate candidate image and the buffer is 393 * provided buffer (assuming this is an appropriate candidate image and the buffer is
394 * appropriately aligned). Upon success the size written is returned, otherw ise 0. 394 * appropriately aligned). Upon success the size written is returned, otherw ise 0.
395 */ 395 */
396 size_t getDeferredTextureImageData(const GrContextThreadSafeProxy&, 396 size_t getDeferredTextureImageData(const GrContextThreadSafeProxy&,
397 const DeferredTextureImageUsageParams[], 397 const DeferredTextureImageUsageParams[],
398 int paramCnt, 398 int paramCnt,
399 void* buffer, 399 void* buffer) const;
400 SkSourceGammaTreatment treatment =
401 SkSourceGammaTreatment::kIgnore) const;
402 400
403 /** 401 /**
404 * Returns a texture-backed image from data produced in SkImage::getDeferred TextureImageData. 402 * Returns a texture-backed image from data produced in SkImage::getDeferred TextureImageData.
405 * The context must be the context that provided the proxy passed to 403 * The context must be the context that provided the proxy passed to
406 * getDeferredTextureImageData. 404 * getDeferredTextureImageData.
407 */ 405 */
408 static sk_sp<SkImage> MakeFromDeferredTextureImageData(GrContext*, const voi d*, SkBudgeted); 406 static sk_sp<SkImage> MakeFromDeferredTextureImageData(GrContext*, const voi d*, SkBudgeted);
409 407
410 // Helper functions to convert to SkBitmap 408 // Helper functions to convert to SkBitmap
411 409
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 SkImage* newSubset(const SkIRect& subset) const { return this->makeSubset(su bset).release(); } 462 SkImage* newSubset(const SkIRect& subset) const { return this->makeSubset(su bset).release(); }
465 SkImage* newTextureImage(GrContext* ctx) const { return this->makeTextureIma ge(ctx).release(); } 463 SkImage* newTextureImage(GrContext* ctx) const { return this->makeTextureIma ge(ctx).release(); }
466 #endif 464 #endif
467 465
468 protected: 466 protected:
469 SkImage(int width, int height, uint32_t uniqueID); 467 SkImage(int width, int height, uint32_t uniqueID);
470 468
471 private: 469 private:
472 static sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, 470 static sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&,
473 const GrMipLevel* texels, int mi pLevelCount, 471 const GrMipLevel* texels, int mi pLevelCount,
474 SkBudgeted, SkSourceGammaTreatme nt); 472 SkBudgeted);
475 473
476 const int fWidth; 474 const int fWidth;
477 const int fHeight; 475 const int fHeight;
478 const uint32_t fUniqueID; 476 const uint32_t fUniqueID;
479 477
480 typedef SkRefCnt INHERITED; 478 typedef SkRefCnt INHERITED;
481 }; 479 };
482 480
483 #endif 481 #endif
OLDNEW
« no previous file with comments | « gm/deferredtextureimagedata.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698