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

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: remove errant lines 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
« no previous file with comments | « src/gpu/GrGpuCommandBuffer.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "GrRenderTarget.h"
13 #include "SkRect.h"
14
15 void GrGpuCommandBuffer::submit(const SkIRect& bounds) {
16 this->gpu()->handleDirtyContext();
17 this->onSubmit(bounds);
18 }
19
20 void GrGpuCommandBuffer::clear(const SkIRect& rect, GrColor color, GrRenderTarge t* renderTarget) {
21 SkASSERT(renderTarget);
22 SkASSERT(SkIRect::MakeWH(renderTarget->width(), renderTarget->height()).cont ains(rect));
23 this->onClear(renderTarget, rect, color);
24 }
25
26 void GrGpuCommandBuffer::clearStencilClip(const SkIRect& rect,
27 bool insideClip,
28 GrRenderTarget* renderTarget) {
29 SkASSERT(renderTarget);
30 this->onClearStencilClip(renderTarget, rect, insideClip);
31 }
32
33
34 bool GrGpuCommandBuffer::draw(const GrPipeline& pipeline,
35 const GrPrimitiveProcessor& primProc,
36 const GrMesh* mesh,
37 int meshCount) {
38 if (primProc.numAttribs() > this->gpu()->caps()->maxVertexAttributes()) {
39 this->gpu()->stats()->incNumFailedDraws();
40 return false;
41 }
42 this->onDraw(pipeline, primProc, mesh, meshCount);
43 return true;
44 }
45
OLDNEW
« no previous file with comments | « src/gpu/GrGpuCommandBuffer.h ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698