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> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/test/test_simple_task_runner.h" | 10 #include "base/test/test_simple_task_runner.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (pname == GL_QUERY_RESULT_AVAILABLE_EXT) | 68 if (pname == GL_QUERY_RESULT_AVAILABLE_EXT) |
69 *params = 1; | 69 *params = 1; |
70 } | 70 } |
71 }; | 71 }; |
72 | 72 |
73 class PerfContextProvider : public ContextProvider { | 73 class PerfContextProvider : public ContextProvider { |
74 public: | 74 public: |
75 PerfContextProvider() : context_gl_(new PerfGLES2Interface) {} | 75 PerfContextProvider() : context_gl_(new PerfGLES2Interface) {} |
76 | 76 |
77 bool BindToCurrentThread() override { return true; } | 77 bool BindToCurrentThread() override { return true; } |
78 Capabilities ContextCapabilities() override { | 78 gpu::Capabilities ContextCapabilities() override { |
79 Capabilities capabilities; | 79 gpu::Capabilities capabilities; |
80 capabilities.gpu.image = true; | 80 capabilities.image = true; |
81 capabilities.gpu.sync_query = true; | 81 capabilities.sync_query = true; |
82 return capabilities; | 82 return capabilities; |
83 } | 83 } |
84 gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); } | 84 gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); } |
85 gpu::ContextSupport* ContextSupport() override { return &support_; } | 85 gpu::ContextSupport* ContextSupport() override { return &support_; } |
86 class GrContext* GrContext() override { | 86 class GrContext* GrContext() override { |
87 if (gr_context_) | 87 if (gr_context_) |
88 return gr_context_.get(); | 88 return gr_context_.get(); |
89 | 89 |
90 skia::RefPtr<const GrGLInterface> null_interface = | 90 skia::RefPtr<const GrGLInterface> null_interface = |
91 skia::AdoptRef(GrGLCreateNullInterface()); | 91 skia::AdoptRef(GrGLCreateNullInterface()); |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 RunBuildTileTaskGraphTest("1_0", 1, 0); | 495 RunBuildTileTaskGraphTest("1_0", 1, 0); |
496 RunBuildTileTaskGraphTest("32_0", 32, 0); | 496 RunBuildTileTaskGraphTest("32_0", 32, 0); |
497 RunBuildTileTaskGraphTest("1_1", 1, 1); | 497 RunBuildTileTaskGraphTest("1_1", 1, 1); |
498 RunBuildTileTaskGraphTest("32_1", 32, 1); | 498 RunBuildTileTaskGraphTest("32_1", 32, 1); |
499 RunBuildTileTaskGraphTest("1_4", 1, 4); | 499 RunBuildTileTaskGraphTest("1_4", 1, 4); |
500 RunBuildTileTaskGraphTest("32_4", 32, 4); | 500 RunBuildTileTaskGraphTest("32_4", 32, 4); |
501 } | 501 } |
502 | 502 |
503 } // namespace | 503 } // namespace |
504 } // namespace cc | 504 } // namespace cc |
OLD | NEW |