Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Unified Diff: components/exo/wayland/server.cc

Issue 1548163002: exo: Add Surface::SetBufferScale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« components/exo/surface.cc ('K') | « components/exo/surface_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index 2bb39324cb8fb79b7451d1165594c93a1059382b..18dc3826e9f528f2c6c52bc97c61fd4905a2808a 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -175,7 +175,15 @@ void surface_set_buffer_transform(wl_client* client,
void surface_set_buffer_scale(wl_client* client,
wl_resource* resource,
int32_t scale) {
- NOTIMPLEMENTED();
+ if (scale < 1) {
+ wl_resource_post_error(resource, WL_SURFACE_ERROR_INVALID_SCALE,
+ "buffer scale must be at least one "
+ "('%d' specified)",
+ scale);
+ return;
+ }
+
+ GetUserDataAs<Surface>(resource)->SetBufferScale(scale);
}
const struct wl_surface_interface surface_implementation = {
« components/exo/surface.cc ('K') | « components/exo/surface_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698