| 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_cache.h" | 5 #include "cc/tiles/gpu_image_decode_cache.h" |
| 6 | 6 |
| 7 #include "cc/playback/draw_image.h" | 7 #include "cc/paint/draw_image.h" |
| 8 #include "cc/test/test_context_provider.h" | 8 #include "cc/test/test_context_provider.h" |
| 9 #include "cc/test/test_tile_task_runner.h" | 9 #include "cc/test/test_tile_task_runner.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/skia/include/core/SkRefCnt.h" | 11 #include "third_party/skia/include/core/SkRefCnt.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 size_t kGpuMemoryLimitBytes = 96 * 1024 * 1024; | 16 size_t kGpuMemoryLimitBytes = 96 * 1024 * 1024; |
| 17 class TestGpuImageDecodeCache : public GpuImageDecodeCache { | 17 class TestGpuImageDecodeCache : public GpuImageDecodeCache { |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 // Run the decode task. | 1387 // Run the decode task. |
| 1388 TestTileTaskRunner::ProcessTask(task.get()); | 1388 TestTileTaskRunner::ProcessTask(task.get()); |
| 1389 | 1389 |
| 1390 // The image should remain in the cache till we unref it. | 1390 // The image should remain in the cache till we unref it. |
| 1391 EXPECT_TRUE(cache.IsInInUseCacheForTesting(draw_image)); | 1391 EXPECT_TRUE(cache.IsInInUseCacheForTesting(draw_image)); |
| 1392 cache.UnrefImage(draw_image); | 1392 cache.UnrefImage(draw_image); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 } // namespace | 1395 } // namespace |
| 1396 } // namespace cc | 1396 } // namespace cc |
| OLD | NEW |