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

Unified Diff: src/gpu/vk/GrVkGpu.cpp

Issue 2113303002: Use bounds of batches for render pass bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix int to scalar Created 4 years, 6 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/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.cpp
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index ab6761cc32b5ccda141ca310bdd8215ed9065ed8..8716c63e6575c4c68123902fb739a2c1bbc80694 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1487,10 +1487,19 @@ void GrVkGpu::submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer* buf
const VkClearValue* colorClear,
GrVkRenderTarget* target,
const SkIRect& bounds) {
+ const SkIRect* pBounds = &bounds;
+ SkIRect flippedBounds;
+ if (kBottomLeft_GrSurfaceOrigin == target->origin()) {
+ flippedBounds = bounds;
+ flippedBounds.fTop = target->height() - bounds.fBottom;
+ flippedBounds.fBottom = target->height() - bounds.fTop;
+ pBounds = &flippedBounds;
+ }
+
// Currently it is fine for us to always pass in 1 for the clear count even if no attachment
// uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment
// which is always at the first attachment.
- fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, bounds, true);
+ fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true);
fCurrentCmdBuffer->executeCommands(this, buffer);
fCurrentCmdBuffer->endRenderPass(this);
}
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698