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

Side by Side Diff: src/gpu/GrGpuCommandBuffer.cpp

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrGpuCommandBuffer.h"
9
10 #include "GrGpu.h"
11 #include "GrPrimitiveProcessor.h"
12
13
14 void GrGpuCommandBuffer::submit(const SkIRect& bounds) {
15 this->gpu()->handleDirtyContext();
16 this->onSubmit(bounds);
17 }
18
19 bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline,
20 const GrPrimitiveProcessor& primProc,
21 const GrMesh* mesh,
22 int meshCount) {
23 if (primProc.numAttribs() > this->gpu()->caps()->maxVertexAttributes()) {
24 this->gpu()->stats()->incNumFailedDraws();
25 return false;
26 }
27 this->onDraw(pipeline, primProc, mesh, meshCount);
28 return true;
29 }
30
OLDNEW
« no previous file with comments | « src/gpu/GrGpuCommandBuffer.h ('k') | src/gpu/batches/GrBatch.h » ('j') | tests/VkClearTests.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698