Chromium Code Reviews| OLD | NEW |
|---|---|
| (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(); | |
|
jvanverth1
2016/06/17 15:25:15
It'd be less verbose to just say fGpu->
egdaniel
2016/06/17 15:57:35
The base class doesn't have a fGpu. I could pass t
jvanverth1
2016/06/17 16:49:13
It's fine the way it is.
| |
| 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 | |
| OLD | NEW |