diff options
author | Robert Phillips <robertphillips@google.com> | 2017-10-10 10:42:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-10 15:41:42 +0000 |
commit | a108c92ae5868ca99759a872edddb377f31ad1be (patch) | |
tree | 09b54a3c7782921c96933dd0e7f0fd7d9ce5a9c0 /src/gpu/GrRenderTargetProxy.cpp | |
parent | e0240455a84d530e5f5a5c1525e31341938c9207 (diff) |
Fix drawSpecialImage
W/o this fix the strict constraint on the specialImage draws can sometimes be removed. This CL ensures that the temporary SkImage always has the actual dimensions of the special Image.
Note: the replacement of full screen clears w/ draws revealed this bug b.c. the image filters were only drawing a rect for the content area of the special images. Thus when the final DAG result was drawn to the canvas some of the bleed through (from the removal of the strict constraint) was showing.
Bug: 755871, 768134
skbug.com/7122
Change-Id: Id67b7143225c24b716e260c973f3bbf68f20188a
Reviewed-on: https://skia-review.googlesource.com/57660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetProxy.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp index 111ecf6625..77a3e52c2a 100644 --- a/src/gpu/GrRenderTargetProxy.cpp +++ b/src/gpu/GrRenderTargetProxy.cpp @@ -79,28 +79,6 @@ sk_sp<GrSurface> GrRenderTargetProxy::createSurface(GrResourceProvider* resource return surface; } -int GrRenderTargetProxy::worstCaseWidth() const { - if (fTarget) { - return fTarget->width(); - } - - if (SkBackingFit::kExact == fFit) { - return fWidth; - } - return SkTMax(GrResourceProvider::kMinScratchTextureSize, GrNextPow2(fWidth)); -} - -int GrRenderTargetProxy::worstCaseHeight() const { - if (fTarget) { - return fTarget->height(); - } - - if (SkBackingFit::kExact == fFit) { - return fHeight; - } - return SkTMax(GrResourceProvider::kMinScratchTextureSize, GrNextPow2(fHeight)); -} - size_t GrRenderTargetProxy::onUninstantiatedGpuMemorySize() const { int colorSamplesPerPixel = this->numColorSamples() + 1; // TODO: do we have enough information to improve this worst case estimate? |