OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> |
| 6 |
5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
6 #include "cc/playback/display_list_raster_source.h" | 8 #include "cc/playback/display_list_raster_source.h" |
7 #include "cc/test/fake_display_list_recording_source.h" | 9 #include "cc/test/fake_display_list_recording_source.h" |
8 #include "cc/test/skia_common.h" | 10 #include "cc/test/skia_common.h" |
9 #include "skia/ext/refptr.h" | 11 #include "skia/ext/refptr.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/skia/include/core/SkPixelRef.h" | 13 #include "third_party/skia/include/core/SkPixelRef.h" |
12 #include "third_party/skia/include/core/SkShader.h" | 14 #include "third_party/skia/include/core/SkShader.h" |
13 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/geometry/size_conversions.h" | 16 #include "ui/gfx/geometry/size_conversions.h" |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 scoped_refptr<DisplayListRasterSource> raster = | 529 scoped_refptr<DisplayListRasterSource> raster = |
528 DisplayListRasterSource::CreateFromDisplayListRecordingSource( | 530 DisplayListRasterSource::CreateFromDisplayListRecordingSource( |
529 recording_source.get(), false); | 531 recording_source.get(), false); |
530 size_t total_memory_usage = raster->GetPictureMemoryUsage(); | 532 size_t total_memory_usage = raster->GetPictureMemoryUsage(); |
531 EXPECT_GE(total_memory_usage, kReportedMemoryUsageInBytes); | 533 EXPECT_GE(total_memory_usage, kReportedMemoryUsageInBytes); |
532 EXPECT_LT(total_memory_usage, 2 * kReportedMemoryUsageInBytes); | 534 EXPECT_LT(total_memory_usage, 2 * kReportedMemoryUsageInBytes); |
533 } | 535 } |
534 | 536 |
535 } // namespace | 537 } // namespace |
536 } // namespace cc | 538 } // namespace cc |
OLD | NEW |