diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-13 12:53:07 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-13 12:53:07 +0000 |
commit | e98ade4fdee03a234f68669bea84d07db4a8527e (patch) | |
tree | 9a3480ac46cace0d773081b20965ea0597dc3cbb /src | |
parent | 357818cb76d9f8a6a74d1b2f9c91fb4c0b7a288c (diff) |
Added Texture desc to render target
http://codereview.appspot.com/6302068/
git-svn-id: http://skia.googlecode.com/svn/trunk@4243 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrRenderTarget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp index ed1a018a02..be0844460e 100644 --- a/src/gpu/GrRenderTarget.cpp +++ b/src/gpu/GrRenderTarget.cpp @@ -52,15 +52,15 @@ void GrRenderTarget::resolve() { size_t GrRenderTarget::sizeInBytes() const { int colorBits; - if (kUnknown_GrPixelConfig == fConfig) { + if (kUnknown_GrPixelConfig == fDesc.fConfig) { colorBits = 32; // don't know, make a guess } else { - colorBits = GrBytesPerPixel(fConfig); + colorBits = GrBytesPerPixel(fDesc.fConfig); } - uint64_t size = fWidth; - size *= fHeight; + uint64_t size = fDesc.fWidth; + size *= fDesc.fHeight; size *= colorBits; - size *= GrMax(1,fSampleCnt); + size *= GrMax(1, fDesc.fSampleCnt); return (size_t)(size / 8); } |