[go: nahoru, domu]

cc: Add image decode queue functionality to image manager.

This patch adds an ability to request an image decode from
the compositor. The caller should specify which image
(SkImage) to decode and a callback. In return, it gets an
id. When the image is decoded, the callback is issued with
this id. The decode is then kept alive for 2 compositor
frames.

Right now, only unittests are using this functionality.

R=enne@chromium.org, ericrk@chromium.org, danakj@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2537683002
Cr-Original-Commit-Position: refs/heads/master@{#443085}
Committed: https://chromium.googlesource.com/chromium/src/+/bb991d41668aa0f37aa6d6712e3bf9b52a5480ae
Review-Url: https://codereview.chromium.org/2537683002
Cr-Commit-Position: refs/heads/master@{#443341}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 7b8bb2b..d16ec63 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -422,6 +422,8 @@
     "scheduler/scheduler_state_machine.cc",
     "scheduler/scheduler_state_machine.h",
     "scheduler/video_frame_controller.h",
+    "tiles/decoded_image_tracker.cc",
+    "tiles/decoded_image_tracker.h",
     "tiles/eviction_tile_priority_queue.cc",
     "tiles/eviction_tile_priority_queue.h",
     "tiles/gpu_image_decode_cache.cc",
@@ -885,6 +887,7 @@
     "test/mock_helper_unittest.cc",
     "test/ordered_simple_task_runner_unittest.cc",
     "test/test_web_graphics_context_3d_unittest.cc",
+    "tiles/decoded_image_tracker_unittest.cc",
     "tiles/gpu_image_decode_cache_unittest.cc",
     "tiles/image_controller_unittest.cc",
     "tiles/mipmap_util_unittest.cc",