|
45 | 45 |
|
46 | 46 | // \ref{\iotwod.imagesurface.mofifiers}, modifiers:
|
47 | 47 | void clear();
|
48 |
| - void flush(); |
49 |
| - void flush(error_code& ec) noexcept; |
50 |
| - void mark_dirty(); |
51 |
| - void mark_dirty(error_code& ec) noexcept; |
52 |
| - void mark_dirty(const basic_bounding_box<graphics_math_type>& extents); |
53 |
| - void mark_dirty(const basic_bounding_box<graphics_math_type>& extents, |
54 |
| - error_code& ec) noexcept; |
55 | 48 | void paint(const basic_brush<GraphicsSurfaces>& b,
|
56 | 49 | const optional<basic_brush_props<GraphicsSurfaces>>& bp = nullopt,
|
57 | 50 | const optional<basic_render_props<GraphicsSurfaces>>& rp = nullopt,
|
|
259 | 252 | <TODO>
|
260 | 253 | \end{itemdescr}
|
261 | 254 |
|
262 |
| -\indexlibrarymember{flush}{basic_image_surface}% |
263 |
| -\begin{itemdecl} |
264 |
| -void flush(); |
265 |
| -void flush(error_code& ec) noexcept; |
266 |
| -\end{itemdecl} |
267 |
| -\begin{itemdescr} |
268 |
| -\pnum |
269 |
| -\effects |
270 |
| -If the implementation does not provide a native handle to the surface's visual data, this function does nothing. |
271 |
| - |
272 |
| -\pnum |
273 |
| -If the implementation does provide a native handle to the surface's visual data, then the implementation performs every action necessary to ensure that all operations on the surface that produce observable effects occur. |
274 |
| - |
275 |
| -\pnum |
276 |
| -The implementation performs any other actions necessary to ensure that the surface will be usable again after a call to \tcode{basic_image_surface::mark_dirty}. |
277 |
| - |
278 |
| -\pnum |
279 |
| -Once a call to \tcode{basic_image_surface::flush} is made, \tcode{basic_image_surface::mark_dirty} shall be called before any other member function of the surface is called or the surface is used as an argument to any other function. |
280 |
| - |
281 |
| -\pnum |
282 |
| -\throws |
283 |
| -As specified in Error reporting (\ref{\iotwod.err.report}). |
284 |
| - |
285 |
| -\pnum |
286 |
| -\remarks |
287 |
| -This function exists to allow the user to take control of the underlying surface using an implementation-provided native handle without introducing a race condition. The implementation's responsibility is to ensure that the user can safely use the underlying surface. |
288 |
| - |
289 |
| -\pnum |
290 |
| -\errors |
291 |
| -The potential errors are \impldefplain{basic_image_surface::flush errors}. |
292 |
| - |
293 |
| -\pnum |
294 |
| -Implementations should avoid producing errors here. |
295 |
| - |
296 |
| -\pnum |
297 |
| -If the implementation does not provide a native handle to the \tcode{basic_image_surface} object's visual data, this function shall not produce any errors. |
298 |
| - |
299 |
| -\pnum |
300 |
| -\begin{note} |
301 |
| -There are several purposes for \tcode{basic_image_surface::flush} and \tcode{basic_image_surface::mark_dirty}. |
302 |
| - |
303 |
| -\pnum |
304 |
| -One is to allow implementation wide latitude in how they implement the rendering and composing operations (\ref{\iotwod.surface.rendering}), such as batching calls and then sending them to graphics acceleration hardware at appropriate times. |
305 |
| - |
306 |
| -\pnum |
307 |
| -Another is to give implementations the chance during the call to \tcode{basic_image_surface::flush} to save any internal state that might be modified by the user and then restore it during the call to \tcode{basic_image_surface::mark_dirty}. |
308 |
| - |
309 |
| -\pnum |
310 |
| -Other uses of this pair of calls are also possible. |
311 |
| -\end{note} |
312 |
| -\end{itemdescr} |
313 |
| - |
314 |
| -\indexlibrarymember{mark_dirty}{basic_image_surface}% |
315 |
| -\begin{itemdecl} |
316 |
| -void mark_dirty(); |
317 |
| -void mark_dirty(error_code& ec) noexcept; |
318 |
| -void mark_dirty(const basic_bounding_box<graphics_math_type>& extents); |
319 |
| -void mark_dirty(const basic_bounding_box<graphics_math_type>& extents, error_code& ec) noexcept; |
320 |
| -\end{itemdecl} |
321 |
| -\begin{itemdescr} |
322 |
| -\pnum |
323 |
| -\effects |
324 |
| -If the implementation does not provide a native handle to the \tcode{basic_image_surface} object's visual data, this function shall do nothing. |
325 |
| - |
326 |
| -\pnum |
327 |
| -If the implementation does provide a native handle to the \tcode{basic_image_surface} object's visual data, then: |
328 |
| -\begin{itemize} |
329 |
| -\item If called without a \tcode{basic_bounding_box} argument, informs the implementation that external changes using a native handle potentially modified all of the surface's visual data. |
330 |
| -\item If called with a \tcode{basic_bounding_box} argument, informs the implementation that external changes using a native handle potentially modified the surface's visual data only within the bounds specified by the \term{bounding rectangle} \tcode{basic_bounding_box\{ round(extents.x()), round (extents.y()), round(extents.width()), round(extents.height())\}}. No part of the bounding rectangle shall be outside of the bounds of the surface's visual data; no diagnostic is required. |
331 |
| -\end{itemize} |
332 |
| - |
333 |
| -\pnum |
334 |
| -\throws |
335 |
| -As specified in Error reporting (\ref{\iotwod.err.report}). |
336 |
| - |
337 |
| -\pnum |
338 |
| -\remarks |
339 |
| -After external changes are made to this \tcode{basic_image_surface} object's visual data using a native pointer, this function shall be called before using this \tcode{basic_image_surface} object; no diagnostic is required. |
340 |
| - |
341 |
| -\pnum |
342 |
| -\errors |
343 |
| -The errors, if any, produced by this function are \impldefplain{basic_image_surface!mark_dirty}. |
344 |
| - |
345 |
| -\pnum |
346 |
| -If the implementation does not provide a native handle to the \tcode{basic_image_surface} object's visual data, this function shall not produce any errors. |
347 |
| -\end{itemdescr} |
348 |
| - |
349 | 255 | \indexlibrarymember{paint}{basic_image_surface}%
|
350 | 256 | \begin{itemdecl}
|
351 | 257 | void paint(const basic_brush<GraphicsSurfaces>& b,
|
|
0 commit comments