| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/gpu/texture_cache.h" | 5 #include "mojo/gpu/texture_cache.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "mojo/gpu/gl_context.h" | 9 #include "mojo/gpu/gl_context.h" |
| 10 #include "mojo/gpu/gl_texture.h" | 10 #include "mojo/gpu/gl_texture.h" |
| 11 #include "mojo/public/cpp/application/application_impl.h" | 11 #include "mojo/public/cpp/application/application_impl.h" |
| 12 #include "mojo/public/cpp/application/application_test_base.h" | 12 #include "mojo/public/cpp/application/application_test_base.h" |
| 13 #include "mojo/services/geometry/public/interfaces/geometry.mojom.h" | 13 #include "mojo/services/geometry/interfaces/geometry.mojom.h" |
| 14 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" | 14 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 static const base::TimeDelta kDefaultMessageDelay = | 19 static const base::TimeDelta kDefaultMessageDelay = |
| 20 base::TimeDelta::FromMilliseconds(20); | 20 base::TimeDelta::FromMilliseconds(20); |
| 21 | 21 |
| 22 class TextureCacheTest : public mojo::test::ApplicationTestBase { | 22 class TextureCacheTest : public mojo::test::ApplicationTestBase { |
| 23 public: | 23 public: |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 // return the texture via resource id | 200 // return the texture via resource id |
| 201 texture_cache.NotifyPendingResourceReturn(texture_info->ResourceId(), | 201 texture_cache.NotifyPendingResourceReturn(texture_info->ResourceId(), |
| 202 texture.Pass()); | 202 texture.Pass()); |
| 203 resource_returner->ReturnResources(resources.Pass()); | 203 resource_returner->ReturnResources(resources.Pass()); |
| 204 | 204 |
| 205 KickMessageLoop(); | 205 KickMessageLoop(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace | 208 } // namespace |
| OLD | NEW |