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

Unified Diff: ui/gfx/image/mojo/image.mojom

Issue 2770693002: ash: HiDPI user avatar for SessionController (Closed)
Patch Set: make mojo similar to c++, update test Created 3 years, 9 months 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
Index: ui/gfx/image/mojo/image.mojom
diff --git a/ui/gfx/image/mojo/image.mojom b/ui/gfx/image/mojo/image.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..878b93c6275a60bd93edb9eb888823cc14ef2970
--- /dev/null
+++ b/ui/gfx/image/mojo/image.mojom
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module gfx.mojom;
+
+// Mojo transport for a SkBitmap via shared buffer.
+// TODO: Merge into bitmap.mojom in skia and maybe share pixel buffer directly
+// to make less copies.
+struct SharedBufferSkBitmap {
+ // Shared buffer handle to hold a serialized SkBitmap.
+ handle<shared_buffer> shared_buffer_handle;
+
+ // Byte size of the shared buffer.
+ uint64 buffer_byte_size;
+};
+
+// Mojo transport for an ImageSkiaRep using SharedBufferSkBitmap.
+struct ImageSkiaRep {
+ // Transport of the bitmap in this representation.
+ SharedBufferSkBitmap bitmap;
+
+ // Corresponding scale of the bitmap or 0 if unscaled.
+ float scale;
+};
+
+// Mojo transport for an ImageSkia via shared buffer. Note the ImageSkia would
msw 2017/03/24 18:47:04 optional nit: "Note that transporting an ImageSkia
xiyuan 2017/03/24 18:53:05 Nice. Thanks.
+// have all reps loaded after using this.
+struct ImageSkia {
+ array<ImageSkiaRep> image_reps;
+};

Powered by Google App Engine
This is Rietveld 408576698