| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "cc/tiles/gpu_image_decode_controller.h" | 5 #include "cc/tiles/gpu_image_decode_controller.h" |
| 6 | 6 |
| 7 #include "cc/playback/draw_image.h" | 7 #include "cc/playback/draw_image.h" |
| 8 #include "cc/raster/tile_task_runner.h" | 8 #include "cc/raster/tile_task.h" |
| 9 #include "cc/test/test_context_provider.h" | 9 #include "cc/test/test_context_provider.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 skia::RefPtr<SkImage> CreateImage(int width, int height) { | 15 skia::RefPtr<SkImage> CreateImage(int width, int height) { |
| 16 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); | 16 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); |
| 17 SkBitmap bitmap; | 17 SkBitmap bitmap; |
| 18 bitmap.allocPixels(info); | 18 bitmap.allocPixels(info); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 ProcessTask(task->dependencies()[0].get()); | 598 ProcessTask(task->dependencies()[0].get()); |
| 599 ProcessTask(task.get()); | 599 ProcessTask(task.get()); |
| 600 | 600 |
| 601 // The image should be in our cache after un-ref. | 601 // The image should be in our cache after un-ref. |
| 602 controller.UnrefImage(draw_image); | 602 controller.UnrefImage(draw_image); |
| 603 DCHECK_GT(controller.GetBytesUsedForTesting(), 0u); | 603 DCHECK_GT(controller.GetBytesUsedForTesting(), 0u); |
| 604 } | 604 } |
| 605 | 605 |
| 606 } // namespace | 606 } // namespace |
| 607 } // namespace cc | 607 } // namespace cc |
| OLD | NEW |