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/resources/tile_task_worker_pool.h" | 5 #include "cc/resources/tile_task_worker_pool.h" |
6 | 6 |
7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "cc/debug/lap_timer.h" | 9 #include "cc/debug/lap_timer.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 if (gr_context_) | 83 if (gr_context_) |
84 return gr_context_.get(); | 84 return gr_context_.get(); |
85 | 85 |
86 skia::RefPtr<const GrGLInterface> null_interface = | 86 skia::RefPtr<const GrGLInterface> null_interface = |
87 skia::AdoptRef(GrGLCreateNullInterface()); | 87 skia::AdoptRef(GrGLCreateNullInterface()); |
88 gr_context_ = skia::AdoptRef(GrContext::Create( | 88 gr_context_ = skia::AdoptRef(GrContext::Create( |
89 kOpenGL_GrBackend, | 89 kOpenGL_GrBackend, |
90 reinterpret_cast<GrBackendContext>(null_interface.get()))); | 90 reinterpret_cast<GrBackendContext>(null_interface.get()))); |
91 return gr_context_.get(); | 91 return gr_context_.get(); |
92 } | 92 } |
| 93 void InvalidateGrContext(uint32_t state) override { |
| 94 if (gr_context_) |
| 95 gr_context_.get()->resetContext(state); |
| 96 } |
93 void SetupLock() override {} | 97 void SetupLock() override {} |
94 base::Lock* GetLock() override { return &context_lock_; } | 98 base::Lock* GetLock() override { return &context_lock_; } |
95 bool IsContextLost() override { return false; } | 99 bool IsContextLost() override { return false; } |
96 void VerifyContexts() override {} | 100 void VerifyContexts() override {} |
97 void DeleteCachedResources() override {} | 101 void DeleteCachedResources() override {} |
98 bool DestroyedOnMainThread() override { return false; } | 102 bool DestroyedOnMainThread() override { return false; } |
99 void SetLostContextCallback(const LostContextCallback& cb) override {} | 103 void SetLostContextCallback(const LostContextCallback& cb) override {} |
100 void SetMemoryPolicyChangedCallback( | 104 void SetMemoryPolicyChangedCallback( |
101 const MemoryPolicyChangedCallback& cb) override {} | 105 const MemoryPolicyChangedCallback& cb) override {} |
102 | 106 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 RunBuildTileTaskQueueTest("1_0", 1, 0); | 512 RunBuildTileTaskQueueTest("1_0", 1, 0); |
509 RunBuildTileTaskQueueTest("32_0", 32, 0); | 513 RunBuildTileTaskQueueTest("32_0", 32, 0); |
510 RunBuildTileTaskQueueTest("1_1", 1, 1); | 514 RunBuildTileTaskQueueTest("1_1", 1, 1); |
511 RunBuildTileTaskQueueTest("32_1", 32, 1); | 515 RunBuildTileTaskQueueTest("32_1", 32, 1); |
512 RunBuildTileTaskQueueTest("1_4", 1, 4); | 516 RunBuildTileTaskQueueTest("1_4", 1, 4); |
513 RunBuildTileTaskQueueTest("32_4", 32, 4); | 517 RunBuildTileTaskQueueTest("32_4", 32, 4); |
514 } | 518 } |
515 | 519 |
516 } // namespace | 520 } // namespace |
517 } // namespace cc | 521 } // namespace cc |
OLD | NEW |