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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkGpu.h" 8 #include "GrVkGpu.h"
9 9
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 transferBuffer->unref(); 1480 transferBuffer->unref();
1481 1481
1482 return true; 1482 return true;
1483 } 1483 }
1484 1484
1485 void GrVkGpu::submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer* buf fer, 1485 void GrVkGpu::submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer* buf fer,
1486 const GrVkRenderPass* renderPass, 1486 const GrVkRenderPass* renderPass,
1487 const VkClearValue* colorClear, 1487 const VkClearValue* colorClear,
1488 GrVkRenderTarget* target, 1488 GrVkRenderTarget* target,
1489 const SkIRect& bounds) { 1489 const SkIRect& bounds) {
1490 const SkIRect* pBounds = &bounds;
1491 SkIRect flippedBounds;
1492 if (kBottomLeft_GrSurfaceOrigin == target->origin()) {
1493 flippedBounds = bounds;
1494 flippedBounds.fTop = target->height() - bounds.fBottom;
1495 flippedBounds.fBottom = target->height() - bounds.fTop;
1496 pBounds = &flippedBounds;
1497 }
1498
1490 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment 1499 // Currently it is fine for us to always pass in 1 for the clear count even if no attachment
1491 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment 1500 // uses it. In the current state, we also only use the LOAD_OP_CLEAR for the color attachment
1492 // which is always at the first attachment. 1501 // which is always at the first attachment.
1493 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, bounds, true); 1502 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target, *pBounds, true);
1494 fCurrentCmdBuffer->executeCommands(this, buffer); 1503 fCurrentCmdBuffer->executeCommands(this, buffer);
1495 fCurrentCmdBuffer->endRenderPass(this); 1504 fCurrentCmdBuffer->endRenderPass(this);
1496 } 1505 }
1497 1506
OLDNEW
« 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