Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 62 files). Show all
Unified · Split
| @@ -2024,7 +2024,7 @@ void GeometryCache::useGridPipeline(gpu::Batch& batch, GridBuffer gridBuffer, bo · 2023 unmodified lines | ||
| 2024 | 2024 | }; |
| 2025 | 2025 | |
| 2026 | 2026 | for (auto& key : keys) { |
| 2027 | − gpu::StatePointer state = gpu::StatePointer(new gpu::State()); | |
| 2027 | + gpu::StatePointer state = std::make_shared<gpu::State>(); | |
| 2028 | 2028 | state->setDepthTest(true, !std::get<0>(key), gpu::LESS_EQUAL); |
| 2029 | 2029 | if (std::get<0>(key)) { |
| 2030 | 2030 | PrepareStencil::testMask(*state); |
| @@ -2132,7 +2132,7 @@ gpu::PipelinePointer GeometryCache::getWebBrowserProgram(bool transparent, bool · 101 unmodified lines | ||
| 2132 | 2132 | // For any non-opaque or non-deferred pipeline, we use web_browser_forward |
| 2133 | 2133 | auto pipeline = (transparent || forward) ? web_browser_forward : web_browser; |
| 2134 | 2134 | |
| 2135 | − gpu::StatePointer state = gpu::StatePointer(new gpu::State()); | |
| 2135 | + gpu::StatePointer state = std::make_shared<gpu::State>(); | |
| 2136 | 2136 | state->setDepthTest(true, !transparent, gpu::LESS_EQUAL); |
| 2137 | 2137 | // FIXME: do we need a testMaskDrawNoAA? |
| 2138 | 2138 | PrepareStencil::testMaskDrawShapeNoAA(*state); |
| @@ -2419,7 +2419,7 @@ graphics::MeshPointer GeometryCache::meshFromShape(Shape geometryShape, glm::vec · 280 unmodified lines | ||
| 2419 | 2419 | colorsBufferView.edit<glm::vec3>((gpu::BufferView::Index)i) = color; |
| 2420 | 2420 | } |
| 2421 | 2421 | |
| 2422 | − graphics::MeshPointer mesh(new graphics::Mesh()); | |
| 2422 | + graphics::MeshPointer mesh(std::make_shared<graphics::Mesh>()); | |
| 2423 | 2423 | mesh->setVertexBuffer(positionsBufferView); |
| 2424 | 2424 | mesh->setIndexBuffer(indexBufferView); |
| 2425 | 2425 | mesh->addAttribute(gpu::Stream::NORMAL, normalsBufferView); |