| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "GrGpuCommandBuffer.h" | 8 #include "GrGpuCommandBuffer.h" |
| 9 | 9 |
| 10 #include "GrCaps.h" |
| 10 #include "GrGpu.h" | 11 #include "GrGpu.h" |
| 11 #include "GrPrimitiveProcessor.h" | 12 #include "GrPrimitiveProcessor.h" |
| 12 #include "GrRenderTarget.h" | 13 #include "GrRenderTarget.h" |
| 13 #include "SkRect.h" | 14 #include "SkRect.h" |
| 14 | 15 |
| 15 void GrGpuCommandBuffer::submit(const SkIRect& bounds) { | 16 void GrGpuCommandBuffer::submit(const SkIRect& bounds) { |
| 16 this->gpu()->handleDirtyContext(); | 17 this->gpu()->handleDirtyContext(); |
| 17 this->onSubmit(bounds); | 18 this->onSubmit(bounds); |
| 18 } | 19 } |
| 19 | 20 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 36 const GrMesh* mesh, | 37 const GrMesh* mesh, |
| 37 int meshCount) { | 38 int meshCount) { |
| 38 if (primProc.numAttribs() > this->gpu()->caps()->maxVertexAttributes()) { | 39 if (primProc.numAttribs() > this->gpu()->caps()->maxVertexAttributes()) { |
| 39 this->gpu()->stats()->incNumFailedDraws(); | 40 this->gpu()->stats()->incNumFailedDraws(); |
| 40 return false; | 41 return false; |
| 41 } | 42 } |
| 42 this->onDraw(pipeline, primProc, mesh, meshCount); | 43 this->onDraw(pipeline, primProc, mesh, meshCount); |
| 43 return true; | 44 return true; |
| 44 } | 45 } |
| 45 | 46 |
| OLD | NEW |