Skip to content

Commit d4efeef

Browse files
committed
1 parent 2114c62 commit d4efeef

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

P0267_RefImpl/P0267_RefImpl/image_surface.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void image_surface::save(string f, image_file_format idf) {
401401
const auto w = width();
402402
const auto h = height();
403403
const size_t sfcStride = w * 4;
404-
const size_t mapStride = stride();
404+
const size_t mapStride = cairo_image_surface_get_stride(_Surface.get());
405405
auto sfcData = make_unique<unsigned char[]>(sfcStride * h);
406406
switch (_Format)
407407
{
@@ -555,7 +555,7 @@ void image_surface::save(string f, image_file_format idf) {
555555
const auto w = width();
556556
const auto h = height();
557557
const size_t sfcStride = (_Format == format::a8 ? w : w * 4);
558-
const size_t mapStride = stride();
558+
const size_t mapStride = cairo_image_surface_get_stride(_Surface.get());
559559
auto sfcData = make_unique<unsigned char[]>(sfcStride * h);
560560

561561
switch (_Format)
@@ -738,10 +738,6 @@ int image_surface::height() const noexcept {
738738
return cairo_image_surface_get_height(_Surface.get());
739739
}
740740

741-
int image_surface::stride() const noexcept {
742-
return cairo_image_surface_get_stride(_Surface.get());
743-
}
744-
745741
#ifdef __clang__
746742
#pragma clang diagnostic pop
747743
#endif

P0267_RefImpl/P0267_RefImpl/xsurfaces.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,6 @@ namespace std::experimental::io2d {
254254
class image_surface : public surface {
255255
friend surface;
256256
public:
257-
// surplus to paper
258-
_IO2D_API int stride() const noexcept;
259-
260257
_IO2D_API image_surface(io2d::format fmt, int width, int height);
261258
#ifdef _Filesystem_support_test
262259
_IO2D_API image_surface(filesystem::path f, image_file_format i, io2d::format fmt);

0 commit comments

Comments
 (0)