rm rasterize_properties, should be close to working...doesn't work

This commit is contained in:
Lauren Budorick
2014-08-06 17:40:48 -07:00
parent 9e1156d660
commit 560cc112e1
20 changed files with 94 additions and 279 deletions

View File

@@ -150,54 +150,6 @@ void Painter::renderFill(FillBucket& bucket, std::shared_ptr<StyleLayer> layer_d
// Abort early.
if (!bucket.hasData()) return;
const FillProperties &properties = layer_desc->getProperties<FillProperties>();
// if (layer_desc->rasterize && layer_desc->rasterize->isEnabled(id.z)) {
// if (pass == Translucent) {
// const RasterizedProperties rasterize = layer_desc->rasterize->get(id.z);
// // Buffer value around the 0..4096 extent that will be drawn into the 256x256 pixel
// // texture. We later scale the texture so that the actual bounds will align with this
// // tile's bounds. The reason we do this is so that the
// if (!bucket.prerendered) {
// bucket.prerendered = std::make_unique<PrerenderedTexture>(rasterize);
// bucket.prerendered->bindFramebuffer();
//
// preparePrerender(*bucket.prerendered);
//
// const FillProperties modifiedProperties = [&]{
// FillProperties modifiedProperties = properties;
// modifiedProperties.opacity = 1;
// return modifiedProperties;
// }();
//
// // When drawing the fill, we want to draw a buffer around too, so we
// // essentially downscale everyting, and then upscale it later when rendering.
// const int buffer = rasterize.buffer * 4096.0f;
// const mat4 vtxMatrix = [&]{
// mat4 vtxMatrix;
// matrix::ortho(vtxMatrix, -buffer, 4096 + buffer, -4096 - buffer, buffer, 0, 1);
// matrix::translate(vtxMatrix, vtxMatrix, 0, -4096, 0);
// return vtxMatrix;
// }();
//
// setOpaque();
// renderFill(bucket, modifiedProperties, id, vtxMatrix);
//
// setTranslucent();
// renderFill(bucket, modifiedProperties, id, vtxMatrix);
//
// if (rasterize.blur > 0) {
// bucket.prerendered->blur(*this, rasterize.blur);
// }
//
// // RESET STATE
// bucket.prerendered->unbindFramebuffer();
// finishPrerender(*bucket.prerendered);
// }
//
// renderPrerenderedTexture(*bucket.prerendered, properties);
// }
// } else {
const mat4 &vtxMatrix = translatedMatrix(properties.translate, id, properties.translateAnchor);
renderFill(bucket, properties, id, vtxMatrix);
// }
const mat4 &vtxMatrix = translatedMatrix(properties.translate, id, properties.translateAnchor);
renderFill(bucket, properties, id, vtxMatrix);
}