| OLD | NEW |
| 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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 | 1346 |
| 1347 // This will support copying the dst as CopyImage since all of our surfaces
require transferSrc | 1347 // This will support copying the dst as CopyImage since all of our surfaces
require transferSrc |
| 1348 // and transferDst usage flags in Vulkan. | 1348 // and transferDst usage flags in Vulkan. |
| 1349 desc->fOrigin = src->origin(); | 1349 desc->fOrigin = src->origin(); |
| 1350 desc->fConfig = src->config(); | 1350 desc->fConfig = src->config(); |
| 1351 desc->fFlags = kNone_GrSurfaceFlags; | 1351 desc->fFlags = kNone_GrSurfaceFlags; |
| 1352 return true; | 1352 return true; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&
, | 1355 void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&
, |
| 1356 int* effectiveSampleCnt, SamplePattern*) { | 1356 int* effectiveSampleCnt, SkAutoTDeleteArray<
SkPoint>*) { |
| 1357 // TODO: stub. | 1357 // TODO: stub. |
| 1358 SkASSERT(!this->caps()->sampleLocationsSupport()); | 1358 SkASSERT(!this->caps()->sampleLocationsSupport()); |
| 1359 *effectiveSampleCnt = rt->desc().fSampleCnt; | 1359 *effectiveSampleCnt = rt->desc().fSampleCnt; |
| 1360 } | 1360 } |
| 1361 | 1361 |
| 1362 bool GrVkGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height,
size_t rowBytes, | 1362 bool GrVkGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height,
size_t rowBytes, |
| 1363 GrPixelConfig readConfig, DrawPreference* draw
Preference, | 1363 GrPixelConfig readConfig, DrawPreference* draw
Preference, |
| 1364 ReadPixelTempDrawInfo* tempDrawInfo) { | 1364 ReadPixelTempDrawInfo* tempDrawInfo) { |
| 1365 // These settings we will always want if a temp draw is performed. | 1365 // These settings we will always want if a temp draw is performed. |
| 1366 tempDrawInfo->fTempSurfaceDesc.fFlags = kRenderTarget_GrSurfaceFlag; | 1366 tempDrawInfo->fTempSurfaceDesc.fFlags = kRenderTarget_GrSurfaceFlag; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 GrVkRenderTarget* target, | 1488 GrVkRenderTarget* target, |
| 1489 const SkIRect& bounds) { | 1489 const SkIRect& bounds) { |
| 1490 // Currently it is fine for us to always pass in 1 for the clear count even
if no attachment | 1490 // 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 | 1491 // 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. | 1492 // which is always at the first attachment. |
| 1493 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
bounds, true); | 1493 fCurrentCmdBuffer->beginRenderPass(this, renderPass, 1, colorClear, *target,
bounds, true); |
| 1494 fCurrentCmdBuffer->executeCommands(this, buffer); | 1494 fCurrentCmdBuffer->executeCommands(this, buffer); |
| 1495 fCurrentCmdBuffer->endRenderPass(this); | 1495 fCurrentCmdBuffer->endRenderPass(this); |
| 1496 } | 1496 } |
| 1497 | 1497 |
| OLD | NEW |