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

Unified Diff: src/image/SkImage_Gpu.h

Issue 1903483003: Add onImageInfo call to SkImage_Base. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ImageInfo changes. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.h
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 333a96386e2f9a81d2ea85f9f329b25169216bb9..612741ee7b7bc37c6f27a7a357d18464b59d3d8a 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -12,6 +12,7 @@
#include "GrTexture.h"
#include "GrGpuResourcePriv.h"
#include "SkBitmap.h"
+#include "SkGr.h"
#include "SkImage_Base.h"
#include "SkImagePriv.h"
#include "SkSurface.h"
@@ -25,6 +26,10 @@ public:
SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType, GrTexture*, SkBudgeted);
~SkImage_Gpu() override;
+ SkImageInfo onImageInfo() const override {
+ return GrMakeInfoFromTexture(fTexture, fTexture->width(), fTexture->height(), isOpaque());
+ }
+
void applyBudgetDecision() const {
if (SkBudgeted::kYes == fBudgeted) {
fTexture->resourcePriv().makeBudgeted();
« no previous file with comments | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698