[vte/wip/sixels: 33/111] image: includes -> contains, combine -> subsume
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/sixels: 33/111] image: includes -> contains, combine -> subsume
- Date: Sat, 8 Aug 2020 18:43:00 +0000 (UTC)
commit 877ba8b19fd9257a5e86951176047e1929f47f87
Author: Hans Petter Jansson <hpj cl no>
Date: Sat Aug 8 20:42:48 2020 +0200
image: includes -> contains, combine -> subsume
Hopefully slightly more expressive labels.
src/image.cc | 8 ++++----
src/image.hh | 4 ++--
src/ring.cc | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/image.cc b/src/image.cc
index c2f82547..308bbddb 100644
--- a/src/image.cc
+++ b/src/image.cc
@@ -84,9 +84,9 @@ Image::is_frozen() const
return (m_surface == NULL);
}
-/* Test whether this image includes given image */
+/* Test whether this image contains given image */
bool
-Image::includes(const Image *other) const
+Image::contains(const Image *other) const
{
assert(other != nullptr);
@@ -164,7 +164,7 @@ Image::freeze()
/* Merge another image into this image */
bool
-Image::combine(Image *other, unsigned long char_width, unsigned long char_height)
+Image::subsume(Image *other, unsigned long char_width, unsigned long char_height)
{
cairo_t *cr;
@@ -225,7 +225,7 @@ Image::unite(Image *other, unsigned long char_width, unsigned long char_height)
m_pixelheight = pixelheight;
m_surface = new_surface;
- return combine(other, char_width, char_height);
+ return subsume(other, char_width, char_height);
}
/* Paint the image with provided cairo context */
diff --git a/src/image.hh b/src/image.hh
index 0642901c..c2a42457 100644
--- a/src/image.hh
+++ b/src/image.hh
@@ -48,11 +48,11 @@ public:
long get_bottom() const;
unsigned long get_stream_position() const;
bool is_frozen() const;
- bool includes(const Image *rhs) const;
+ bool contains(const Image *rhs) const;
size_t resource_size() const;
void freeze();
bool thaw();
- bool combine(Image *rhs, gulong char_width, gulong char_height);
+ bool subsume(Image *rhs, gulong char_width, gulong char_height);
bool unite(Image *rhs, gulong char_width, gulong char_height);
bool paint(cairo_t *cr, gint offsetx, gint offsety);
diff --git a/src/ring.cc b/src/ring.cc
index df5589ad..da194607 100644
--- a/src/ring.cc
+++ b/src/ring.cc
@@ -1537,8 +1537,8 @@ Ring::append_image (cairo_surface_t *surface, gint pixelwidth, gint pixelheight,
for (auto it = m_image_map->lower_bound (top); it != m_image_map->end (); ) {
Image *current = it->second;
- /* Combine two images if one's area includes another's area */
- if (image->includes (current)) {
+ /* Combine two images if one's area contains another's area */
+ if (image->contains (current)) {
/*
* Replace current image with new image
*
@@ -1558,7 +1558,7 @@ Ring::append_image (cairo_surface_t *surface, gint pixelwidth, gint pixelheight,
m_image_map->erase (it++);
delete current;
continue;
- } else if (current->includes (image)) {
+ } else if (current->contains (image)) {
/*
* Copy new image to current image's sub-area.
*
@@ -1575,7 +1575,7 @@ Ring::append_image (cairo_surface_t *surface, gint pixelwidth, gint pixelheight,
} else {
m_image_onscreen_resource_counter -= current->resource_size ();
}
- current->combine (image, char_width, char_height);
+ current->subsume (image, char_width, char_height);
m_image_onscreen_resource_counter += current->resource_size ();
delete image;
goto end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]