Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: cc/raster/raster_buffer_provider_perftest.cc

Issue 2286873003: Provide TaskRunner to ContextCacheController (Closed)
Patch Set: feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/context_cache_controller_unittest.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Copy the data over after setting the data to ensure alignment. 74 // Copy the data over after setting the data to ensure alignment.
75 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, 75 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
76 gpu::CommandBufferId(), fence_sync); 76 gpu::CommandBufferId(), fence_sync);
77 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); 77 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
78 } 78 }
79 }; 79 };
80 80
81 class PerfContextProvider : public ContextProvider { 81 class PerfContextProvider : public ContextProvider {
82 public: 82 public:
83 PerfContextProvider() 83 PerfContextProvider()
84 : context_gl_(new PerfGLES2Interface), cache_controller_(&support_) {} 84 : context_gl_(new PerfGLES2Interface),
85 cache_controller_(&support_, nullptr) {}
85 86
86 bool BindToCurrentThread() override { return true; } 87 bool BindToCurrentThread() override { return true; }
87 gpu::Capabilities ContextCapabilities() override { 88 gpu::Capabilities ContextCapabilities() override {
88 gpu::Capabilities capabilities; 89 gpu::Capabilities capabilities;
89 capabilities.image = true; 90 capabilities.image = true;
90 capabilities.sync_query = true; 91 capabilities.sync_query = true;
91 return capabilities; 92 return capabilities;
92 } 93 }
93 gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); } 94 gpu::gles2::GLES2Interface* ContextGL() override { return context_gl_.get(); }
94 gpu::ContextSupport* ContextSupport() override { return &support_; } 95 gpu::ContextSupport* ContextSupport() override { return &support_; }
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 RunBuildTileTaskGraphTest("1_0", 1, 0); 589 RunBuildTileTaskGraphTest("1_0", 1, 0);
589 RunBuildTileTaskGraphTest("32_0", 32, 0); 590 RunBuildTileTaskGraphTest("32_0", 32, 0);
590 RunBuildTileTaskGraphTest("1_1", 1, 1); 591 RunBuildTileTaskGraphTest("1_1", 1, 1);
591 RunBuildTileTaskGraphTest("32_1", 32, 1); 592 RunBuildTileTaskGraphTest("32_1", 32, 1);
592 RunBuildTileTaskGraphTest("1_4", 1, 4); 593 RunBuildTileTaskGraphTest("1_4", 1, 4);
593 RunBuildTileTaskGraphTest("32_4", 32, 4); 594 RunBuildTileTaskGraphTest("32_4", 32, 4);
594 } 595 }
595 596
596 } // namespace 597 } // namespace
597 } // namespace cc 598 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/context_cache_controller_unittest.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698