diff options
author | 2016-11-07 08:23:48 -0500 | |
---|---|---|
committer | 2016-11-07 14:34:47 +0000 | |
commit | d6214d4f4664ce47861dc690b0ddbea3b7a07855 (patch) | |
tree | bf32d321ac4395222b9ce5e878618757513cb217 /include/gpu/GrSurface.h | |
parent | 44b36a210462dbc8c62bf705d002dbba591c8e7f (diff) |
Further centralize computation of GrSurface VRAM consumption - take 2
This is the same as https://skia-review.googlesource.com/c/4383/ (Further centralize computation of GrSurface VRAM consumption) but with a suppression for Vulkan in the new test and removal of an assert Chromium was triggering.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4450
Change-Id: Ie87d32fd5f0d35c21326b066a0c733cb6f8a5bea
Reviewed-on: https://skia-review.googlesource.com/4450
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrSurface.h')
-rw-r--r-- | include/gpu/GrSurface.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index 8479599948..3f91a2fb70 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -126,11 +126,12 @@ public: fReleaseCtx = ctx; } - static size_t WorstCaseSize(const GrSurfaceDesc& desc); - void setLastOpList(GrOpList* opList); GrOpList* getLastOpList() { return fLastOpList; } + static size_t WorstCaseSize(const GrSurfaceDesc& desc); + static size_t ComputeSize(const GrSurfaceDesc& desc, int colorSamplesPerPixel, bool hasMIPMaps); + protected: // Methods made available via GrSurfacePriv bool savePixels(const char* filename); |