summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/renderer/layers/render_background_layer.cpp3
-rw-r--r--src/mbgl/renderer/pattern_atlas.cpp7
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/renderer/layers/render_background_layer.cpp b/src/mbgl/renderer/layers/render_background_layer.cpp
index be18e2ccb2..db755adf0b 100644
--- a/src/mbgl/renderer/layers/render_background_layer.cpp
+++ b/src/mbgl/renderer/layers/render_background_layer.cpp
@@ -154,7 +154,8 @@ void addPatternIfNeeded(const std::string& id, const LayerPrepareParameters& par
void RenderBackgroundLayer::prepare(const LayerPrepareParameters& params) {
const auto& evaluated = static_cast<const BackgroundLayerProperties&>(*evaluatedProperties).evaluated;
if (!evaluated.get<BackgroundPattern>().to.empty()) {
- // Ensures that the texture gets added and uploaded to the atlas.
+ // Ensures that the pattern bitmap gets copied to atlas bitmap.
+ // Atlas bitmap is uploaded to atlas texture in upload.
addPatternIfNeeded(evaluated.get<BackgroundPattern>().from, params);
addPatternIfNeeded(evaluated.get<BackgroundPattern>().to, params);
}
diff --git a/src/mbgl/renderer/pattern_atlas.cpp b/src/mbgl/renderer/pattern_atlas.cpp
index 320412685b..81223b5ce0 100644
--- a/src/mbgl/renderer/pattern_atlas.cpp
+++ b/src/mbgl/renderer/pattern_atlas.cpp
@@ -6,10 +6,9 @@ namespace mbgl {
namespace {
-// When copied into the atlas texture, image data is padded by one pixel on each side. Icon
-// images are padded with fully transparent pixels, while pattern images are padded with a
-// copy of the image data wrapped from the opposite side. In both cases, this ensures the
-// correct behavior of GL_LINEAR texture sampling mode.
+// When copied into the atlas texture, image data is padded by one pixel on each side.
+// Pattern images are padded with a copy of the image data wrapped from the opposite side.
+// This ensures the correct behavior of GL_LINEAR texture sampling mode.
const uint16_t padding = 1;
mapbox::ShelfPack::ShelfPackOptions shelfPackOptions() {