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 "InstancedRendering.h" | 8 #include "InstancedRendering.h" |
9 | 9 |
10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
11 #include "GrCaps.h" | |
12 #include "GrPipeline.h" | 11 #include "GrPipeline.h" |
13 #include "GrResourceProvider.h" | 12 #include "GrResourceProvider.h" |
14 #include "instanced/InstanceProcessor.h" | 13 #include "instanced/InstanceProcessor.h" |
15 | 14 |
16 namespace gr_instanced { | 15 namespace gr_instanced { |
17 | 16 |
18 InstancedRendering::InstancedRendering(GrGpu* gpu, AntialiasMode lastSupportedAA
Mode, | 17 InstancedRendering::InstancedRendering(GrGpu* gpu, AntialiasMode lastSupportedAA
Mode, |
19 bool canRenderToFloat) | 18 bool canRenderToFloat) |
20 : fGpu(SkRef(gpu)), | 19 : fGpu(SkRef(gpu)), |
21 fLastSupportedAAMode(lastSupportedAAMode), | 20 fLastSupportedAAMode(lastSupportedAAMode), |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 } | 488 } |
490 | 489 |
491 void InstancedRendering::resetGpuResources(ResetType resetType) { | 490 void InstancedRendering::resetGpuResources(ResetType resetType) { |
492 fVertexBuffer.reset(); | 491 fVertexBuffer.reset(); |
493 fIndexBuffer.reset(); | 492 fIndexBuffer.reset(); |
494 fParamsBuffer.reset(); | 493 fParamsBuffer.reset(); |
495 this->onResetGpuResources(resetType); | 494 this->onResetGpuResources(resetType); |
496 } | 495 } |
497 | 496 |
498 } | 497 } |
OLD | NEW |