| 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 "cc/layers/append_quads_data.h" | 5 #include "cc/layers/append_quads_data.h" |
| 6 #include "cc/layers/content_layer_client.h" | 6 #include "cc/layers/content_layer_client.h" |
| 7 #include "cc/layers/picture_layer.h" | 7 #include "cc/layers/picture_layer.h" |
| 8 #include "cc/layers/picture_layer_impl.h" | 8 #include "cc/layers/picture_layer_impl.h" |
| 9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
| 10 #include "cc/test/layer_tree_pixel_test.h" | 10 #include "cc/test/layer_tree_pixel_test.h" |
| 11 #include "cc/test/mock_quad_culler.h" | 11 #include "cc/test/mock_quad_culler.h" |
| 12 #include "cc/trees/layer_tree_impl.h" | 12 #include "cc/trees/layer_tree_impl.h" |
| 13 #include "third_party/skia/include/core/SkCanvas.h" | 13 #include "third_party/skia/include/core/SkCanvas.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
| 15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
| 16 #include "ui/gfx/rect_f.h" | 16 #include "ui/gfx/rect_f.h" |
| 17 | 17 |
| 18 #if !defined(OS_ANDROID) | 18 #if !defined(OS_ANDROID) |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { | 23 class LayerTreeHostOnDemandRasterPixelTest : public LayerTreePixelTest { |
| 24 public: | 24 public: |
| 25 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { | 25 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
| 26 settings->impl_side_painting = true; | 26 settings->impl_side_painting = true; |
| 27 settings->max_bytes_pending_upload = 16 * 1024 * 1024; |
| 27 } | 28 } |
| 28 | 29 |
| 29 virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 30 virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
| 30 // Not enough memory available. Enforce on-demand rasterization. | 31 // Not enough memory available. Enforce on-demand rasterization. |
| 31 impl->SetMemoryPolicy( | 32 impl->SetMemoryPolicy( |
| 32 ManagedMemoryPolicy(1, ManagedMemoryPolicy::CUTOFF_ALLOW_EVERYTHING, | 33 ManagedMemoryPolicy(1, ManagedMemoryPolicy::CUTOFF_ALLOW_EVERYTHING, |
| 33 1, ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING, | 34 1, ManagedMemoryPolicy::CUTOFF_ALLOW_NOTHING, |
| 34 1000)); | 35 1000)); |
| 35 impl->SetDiscardBackBufferWhenNotVisible(true); | 36 impl->SetDiscardBackBufferWhenNotVisible(true); |
| 36 } | 37 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 104 |
| 104 RunPixelTest(GL_WITH_BITMAP, | 105 RunPixelTest(GL_WITH_BITMAP, |
| 105 layer, | 106 layer, |
| 106 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); | 107 base::FilePath(FILE_PATH_LITERAL("blue_yellow.png"))); |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace | 110 } // namespace |
| 110 } // namespace cc | 111 } // namespace cc |
| 111 | 112 |
| 112 #endif // OS_ANDROID | 113 #endif // OS_ANDROID |
| OLD | NEW |