Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module gfx.mojom; | |
| 6 | |
| 7 // Mojo transport for ImageSkiaRep via shared buffer. | |
| 8 struct ImageSkiaRep { | |
| 9 // Shared buffer handle to holds a serialized SkBitmap. | |
| 10 handle<shared_buffer> shared_buffer_handle; | |
| 11 | |
| 12 // Byte size of the shared buffer. | |
| 13 uint32 buffer_byte_size; | |
|
Tom Sepez
2017/03/23 18:11:39
Could it be bigger than this on 64bit platforms?
D
xiyuan
2017/03/23 18:30:41
Maybe in the future. For now, I don't think we use
xiyuan
2017/03/23 19:45:23
Changed uint32 -> uint64 and added a DCHECK for hu
| |
| 14 | |
| 15 // Corresponding scale of the bitmap. | |
| 16 float scale; | |
|
Tom Sepez
2017/03/23 18:11:39
Can this be zero or negative?
xiyuan
2017/03/23 18:30:41
It should never be <= 0. I could add DCHECK in tra
xiyuan
2017/03/23 19:45:23
Actually, the scale can be 0 for an unscaled Image
| |
| 17 }; | |
| 18 | |
| 19 // Mojo transport for existing representations of an ImageSkia via shared | |
| 20 // buffer. Note it is caller's responsibility to ensure the ImageSkia contains | |
| 21 // all needed representations. | |
| 22 struct ImageSkia { | |
| 23 array<ImageSkiaRep> image_reps; | |
| 24 }; | |
| OLD | NEW |