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

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

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 // Release old command buffer and create a new one 383 // Release old command buffer and create a new one
384 fCurrentCmdBuffer->unref(this); 384 fCurrentCmdBuffer->unref(this);
385 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer(); 385 fCurrentCmdBuffer = fResourceProvider.createCommandBuffer();
386 SkASSERT(fCurrentCmdBuffer); 386 SkASSERT(fCurrentCmdBuffer);
387 387
388 fCurrentCmdBuffer->begin(this); 388 fCurrentCmdBuffer->begin(this);
389 } 389 }
390 390
391 /////////////////////////////////////////////////////////////////////////////// 391 ///////////////////////////////////////////////////////////////////////////////
392 GrVertexBuffer* GrVkGpu::onCreateVertexBuffer(size_t size, bool dynamic) { 392 GrBuffer* GrVkGpu::onCreateVertexBuffer(size_t size, bool dynamic) {
393 return GrVkVertexBuffer::Create(this, size, dynamic); 393 return GrVkVertexBuffer::Create(this, size, dynamic);
394 } 394 }
395 395
396 GrIndexBuffer* GrVkGpu::onCreateIndexBuffer(size_t size, bool dynamic) { 396 GrBuffer* GrVkGpu::onCreateIndexBuffer(size_t size, bool dynamic) {
397 return GrVkIndexBuffer::Create(this, size, dynamic); 397 return GrVkIndexBuffer::Create(this, size, dynamic);
398 } 398 }
399 399
400 GrTransferBuffer* GrVkGpu::onCreateTransferBuffer(size_t size, TransferType type ) { 400 GrTransferBuffer* GrVkGpu::onCreateTransferBuffer(size_t size, TransferType type ) {
401 GrVkBuffer::Type bufferType = kCpuToGpu_TransferType ? GrVkBuffer::kCopyRead _Type 401 GrVkBuffer::Type bufferType = kCpuToGpu_TransferType ? GrVkBuffer::kCopyRead _Type
402 : GrVkBuffer::kCopyWrit e_Type; 402 : GrVkBuffer::kCopyWrit e_Type;
403 return GrVkTransferBuffer::Create(this, size, bufferType); 403 return GrVkTransferBuffer::Create(this, size, bufferType);
404 } 404 }
405 405
406 //////////////////////////////////////////////////////////////////////////////// 406 ////////////////////////////////////////////////////////////////////////////////
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 int set_a_break_pt_here = 9; 1661 int set_a_break_pt_here = 9;
1662 aglSwapBuffers(aglGetCurrentContext()); 1662 aglSwapBuffers(aglGetCurrentContext());
1663 #elif defined(SK_BUILD_FOR_WIN32) 1663 #elif defined(SK_BUILD_FOR_WIN32)
1664 SwapBuf(); 1664 SwapBuf();
1665 int set_a_break_pt_here = 9; 1665 int set_a_break_pt_here = 9;
1666 SwapBuf(); 1666 SwapBuf();
1667 #endif 1667 #endif
1668 #endif 1668 #endif
1669 } 1669 }
1670 1670
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698