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

Side by Side Diff: ui/gfx/image/mojo/image.mojom

Issue 2772113004: Make skia.mojom.Bitmap use shared buffer (Closed)
Patch Set: fix gn check 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module gfx.mojom; 5 module gfx.mojom;
6 6
7 // Mojo transport for a SkBitmap via shared buffer. 7 import "skia/public/interfaces/bitmap.mojom";
8 // TODO: Merge into bitmap.mojom in skia and maybe share pixel buffer directly
9 // to make less copies.
10 struct SharedBufferSkBitmap {
11 // Shared buffer handle to hold a serialized SkBitmap.
12 handle<shared_buffer> shared_buffer_handle;
13 8
14 // Byte size of the shared buffer. 9 // Mojo transport for an ImageSkiaRep.
15 uint64 buffer_byte_size;
16 };
17
18 // Mojo transport for an ImageSkiaRep using SharedBufferSkBitmap.
19 struct ImageSkiaRep { 10 struct ImageSkiaRep {
20 // Transport of the bitmap in this representation. 11 // Transport of the bitmap in this representation.
21 SharedBufferSkBitmap bitmap; 12 skia.mojom.Bitmap bitmap;
22 13
23 // Corresponding scale of the bitmap or 0 if unscaled. 14 // Corresponding scale of the bitmap or 0 if unscaled.
24 float scale; 15 float scale;
25 }; 16 };
26 17
27 // Mojo transport for an ImageSkia via shared buffer. Note that transporting an 18 // Mojo transport for an ImageSkia. Note that transporting an ImageSkia over
28 // ImageSkia over mojo will load all of its image representations for supported 19 // mojo will load all of its image representations for supported scales.
29 // scales.
30 struct ImageSkia { 20 struct ImageSkia {
31 array<ImageSkiaRep> image_reps; 21 array<ImageSkiaRep> image_reps;
32 }; 22 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698