@@ -123,9 +123,9 @@ class SparseCanvas : public ISparseCanvas
123123 blockWinWidth = (std::min<uint32_t >)(blockWinWidth, win.x1 - x);
124124 if (!grid.contains (gridX, gridY))
125125 {
126- Logger::logger_ .warn (" sparse canvas : attempt to allocate a block (%u,%u) outside block "
127- " grid bounds (%u,%u,%u,%u)" ,
128- gridX, gridY, grid.x0 , grid.y0 , grid.x1 , grid.y1 );
126+ grklog .warn (" sparse canvas : attempt to allocate a block (%u,%u) outside block "
127+ " grid bounds (%u,%u,%u,%u)" ,
128+ gridX, gridY, grid.x0 , grid.y0 , grid.x1 , grid.y1 );
129129 return false ;
130130 }
131131 auto srcBlock = getBlock (gridX, gridY);
@@ -163,10 +163,10 @@ class SparseCanvas : public ISparseCanvas
163163
164164 if (!isWindowValid (win))
165165 {
166- Logger::logger_ .warn (
167- " Sparse canvas @ res %u, attempt to read/write invalid window (%u,%u,%u,%u) "
168- " for bounds (%u,%u,%u,%u). " ,
169- resno, win. x0 , win. y0 , win. x1 , win. y1 , bounds. x0 , bounds. y0 , bounds. x1 , bounds.y1 );
166+ grklog .warn (" Sparse canvas @ res %u, attempt to read/write invalid window (%u,%u,%u,%u) "
167+ " for bounds (%u,%u,%u,%u). " ,
168+ resno, win. x0 , win. y0 , win. x1 , win. y1 , bounds. x0 , bounds. y0 , bounds. x1 ,
169+ bounds.y1 );
170170 return false ;
171171 }
172172 assert (spacingY != 0 || win.height () == 1 );
@@ -188,22 +188,20 @@ class SparseCanvas : public ISparseCanvas
188188 blockWinWidth = (std::min<uint32_t >)(blockWinWidth, win.x1 - x);
189189 if (!grid.contains (gridX, gridY))
190190 {
191- Logger::logger_.warn (
192- " sparse canvas @ resno %u, Attempt to access a block (%u,%u) outside "
193- " block grid bounds" ,
194- resno, gridX, gridY);
191+ grklog.warn (" sparse canvas @ resno %u, Attempt to access a block (%u,%u) outside "
192+ " block grid bounds" ,
193+ resno, gridX, gridY);
195194 return false ;
196195 }
197196 auto srcBlock = getBlock (gridX, gridY);
198197 if (!srcBlock)
199198 {
200- Logger::logger_.warn (
201- " sparse canvas @ resno %u, %s op: missing block (%u,%u,%u,%u) for %s "
202- " (%u,%u,%u,%u). Skipping." ,
203- resno, isReadOperation ? " read" : " write" , bounds.x0 + gridX * blockWidth,
204- bounds.y0 + gridY * blockHeight, bounds.x0 + (gridX + 1 ) * blockWidth,
205- bounds.y0 + (gridY + 1 ) * blockHeight, isReadOperation ? " read" : " write" , win.x0 ,
206- win.y0 , win.x1 , win.y1 );
199+ grklog.warn (" sparse canvas @ resno %u, %s op: missing block (%u,%u,%u,%u) for %s "
200+ " (%u,%u,%u,%u). Skipping." ,
201+ resno, isReadOperation ? " read" : " write" , bounds.x0 + gridX * blockWidth,
202+ bounds.y0 + gridY * blockHeight, bounds.x0 + (gridX + 1 ) * blockWidth,
203+ bounds.y0 + (gridY + 1 ) * blockHeight, isReadOperation ? " read" : " write" ,
204+ win.x0 , win.y0 , win.x1 , win.y1 );
207205 continue ;
208206 }
209207 if (isReadOperation)
@@ -218,9 +216,9 @@ class SparseCanvas : public ISparseCanvas
218216#ifdef GRK_DEBUG_VALGRIND
219217 size_t val = grk_memcheck<int32_t >(src + blockX, 1 );
220218 if (val != grk_mem_ok)
221- Logger::logger_ .error (" sparse canvas @resno %u, read block(%u,%u) : "
222- " uninitialized at location (%u,%u)" ,
223- resno, gridX, gridY, x + blockX, y_);
219+ grklog .error (" sparse canvas @resno %u, read block(%u,%u) : "
220+ " uninitialized at location (%u,%u)" ,
221+ resno, gridX, gridY, x + blockX, y_);
224222#endif
225223 dest[destInd] = src[blockX];
226224 destInd += spacingX;
@@ -246,9 +244,9 @@ class SparseCanvas : public ISparseCanvas
246244 grk_pt32 pt ((uint32_t )(x + blockX), y_);
247245 size_t val = grk_memcheck<int32_t >(src + srcInd, 1 );
248246 if (val != grk_mem_ok)
249- Logger::logger_ .error (" sparse canvas @ resno %u, write block(%u,%u): "
250- " uninitialized at location (%u,%u)" ,
251- resno, gridX, gridY, x + blockX, y_);
247+ grklog .error (" sparse canvas @ resno %u, write block(%u,%u): "
248+ " uninitialized at location (%u,%u)" ,
249+ resno, gridX, gridY, x + blockX, y_);
252250 }
253251#endif
254252 dest[blockX] = src ? src[srcInd] : 0 ;
0 commit comments