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

Side by Side Diff: src/gpu/vk/GrVkGpu.cpp

Issue 1880613002: Implement initCopySurfaceDstDesc for Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/vk/GrVkGpu.h ('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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 } 1297 }
1298 1298
1299 if (can_copy_as_draw(dst, src, this)) { 1299 if (can_copy_as_draw(dst, src, this)) {
1300 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint); 1300 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint);
1301 return true; 1301 return true;
1302 } 1302 }
1303 1303
1304 return false; 1304 return false;
1305 } 1305 }
1306 1306
1307 bool GrVkGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const {
1308 // Currently we don't support msaa
1309 if (src->asRenderTarget() && src->asRenderTarget()->numColorSamples() > 1) {
1310 return false;
1311 }
1312
1313 // This will support copying the dst as CopyImage since all of our surfaces require transferSrc
1314 // and transferDst usage flags in Vulkan.
1315 desc->fOrigin = src->origin();
1316 desc->fConfig = src->config();
1317 desc->fFlags = kNone_GrSurfaceFlags;
1318 return true;
1319 }
1320
1307 void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& , 1321 void GrVkGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& ,
1308 int* effectiveSampleCnt, SkAutoTDeleteArray< SkPoint>*) { 1322 int* effectiveSampleCnt, SkAutoTDeleteArray< SkPoint>*) {
1309 // TODO: stub. 1323 // TODO: stub.
1310 SkASSERT(!this->caps()->sampleLocationsSupport()); 1324 SkASSERT(!this->caps()->sampleLocationsSupport());
1311 *effectiveSampleCnt = rt->desc().fSampleCnt; 1325 *effectiveSampleCnt = rt->desc().fSampleCnt;
1312 } 1326 }
1313 1327
1314 bool GrVkGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height, size_t rowBytes, 1328 bool GrVkGpu::onGetReadPixelsInfo(GrSurface* srcSurface, int width, int height, size_t rowBytes,
1315 GrPixelConfig readConfig, DrawPreference* draw Preference, 1329 GrPixelConfig readConfig, DrawPreference* draw Preference,
1316 ReadPixelTempDrawInfo* tempDrawInfo) { 1330 ReadPixelTempDrawInfo* tempDrawInfo) {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 aglSwapBuffers(aglGetCurrentContext()); 1580 aglSwapBuffers(aglGetCurrentContext());
1567 int set_a_break_pt_here = 9; 1581 int set_a_break_pt_here = 9;
1568 aglSwapBuffers(aglGetCurrentContext()); 1582 aglSwapBuffers(aglGetCurrentContext());
1569 #elif defined(SK_BUILD_FOR_WIN32) 1583 #elif defined(SK_BUILD_FOR_WIN32)
1570 SwapBuf(); 1584 SwapBuf();
1571 int set_a_break_pt_here = 9; 1585 int set_a_break_pt_here = 9;
1572 SwapBuf(); 1586 SwapBuf();
1573 #endif 1587 #endif
1574 #endif 1588 #endif
1575 } 1589 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698