diff options
author | Robert Phillips <robertphillips@google.com> | 2016-11-07 08:23:48 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-07 14:34:47 +0000 |
commit | d6214d4f4664ce47861dc690b0ddbea3b7a07855 (patch) | |
tree | bf32d321ac4395222b9ce5e878618757513cb217 /src/gpu/GrRenderTarget.cpp | |
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 'src/gpu/GrRenderTarget.cpp')
-rw-r--r-- | src/gpu/GrRenderTarget.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp index 2828866435..f15e3b01bf 100644 --- a/src/gpu/GrRenderTarget.cpp +++ b/src/gpu/GrRenderTarget.cpp @@ -84,17 +84,6 @@ void GrRenderTarget::onAbandon() { INHERITED::onAbandon(); } -size_t GrRenderTarget::ComputeSize(const GrSurfaceDesc& desc, int colorValuesPerPixel) { - SkASSERT(kUnknown_GrPixelConfig != desc.fConfig); - SkASSERT(!GrPixelConfigIsCompressed(desc.fConfig)); - size_t colorBytes = GrBytesPerPixel(desc.fConfig); - SkASSERT(colorBytes > 0); - - size_t rtSize = colorValuesPerPixel * desc.fWidth * desc.fHeight * colorBytes; - SkASSERT(rtSize <= WorstCaseSize(desc)); - return rtSize; -} - /////////////////////////////////////////////////////////////////////////////// bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) { |