Commit a4156863 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Fix off by 1 error in paint op deserialization.

PaintOps with no extra data are of size 4 bytes. The current loop for
processing deserialized ops will miss the last op in the buffer if it
is a simple op.

R=ericrk@chromium.org

Bug: 829622
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ifa58d2211bc46d10bd51175bbd9dd9c010f34e48
Reviewed-on: https://chromium-review.googlesource.com/1093211Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565763}
parent 6ea68f4f
......@@ -3086,7 +3086,7 @@ void RasterDecoderImpl::DoRasterCHROMIUM(GLuint raster_shm_id,
int op_idx = 0;
size_t paint_buffer_size = raster_shm_size;
while (paint_buffer_size > 4) {
while (paint_buffer_size > 0) {
size_t skip = 0;
cc::PaintOp* deserialized_op = cc::PaintOp::Deserialize(
paint_buffer_memory, paint_buffer_size, &data[0],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment