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

Side by Side Diff: gpu/command_buffer/service/mailbox_manager_unittest.cc

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 "base/macros.h" 5 #include "base/macros.h"
6 #include "gpu/command_buffer/common/sync_token.h" 6 #include "gpu/command_buffer/common/sync_token.h"
7 #include "gpu/command_buffer/service/feature_info.h" 7 #include "gpu/command_buffer/service/feature_info.h"
8 #include "gpu/command_buffer/service/gpu_service_test.h" 8 #include "gpu/command_buffer/service/gpu_service_test.h"
9 #include "gpu/command_buffer/service/mailbox_manager_impl.h" 9 #include "gpu/command_buffer/service/mailbox_manager_impl.h"
10 #include "gpu/command_buffer/service/mailbox_manager_sync.h" 10 #include "gpu/command_buffer/service/mailbox_manager_sync.h"
(...skipping 14 matching lines...) Expand all
25 0); 25 0);
26 26
27 class MailboxManagerTest : public GpuServiceTest { 27 class MailboxManagerTest : public GpuServiceTest {
28 public: 28 public:
29 MailboxManagerTest() {} 29 MailboxManagerTest() {}
30 ~MailboxManagerTest() override {} 30 ~MailboxManagerTest() override {}
31 31
32 protected: 32 protected:
33 void SetUp() override { 33 void SetUp() override {
34 GpuServiceTest::SetUp(); 34 GpuServiceTest::SetUp();
35 feature_info_ = new FeatureInfo; 35 GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_);
36 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_);
36 manager_ = new MailboxManagerImpl; 37 manager_ = new MailboxManagerImpl;
37 DCHECK(!manager_->UsesSync()); 38 DCHECK(!manager_->UsesSync());
38 } 39 }
39 40
40 virtual void SetUpWithSynchronizer() { 41 virtual void SetUpWithSynchronizer() {
41 GpuServiceTest::SetUp(); 42 GpuServiceTest::SetUp();
42 feature_info_ = new FeatureInfo; 43 GpuDriverBugWorkarounds::Initialize(gpu_driver_bug_workarounds_);
44 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_);
43 manager_ = new MailboxManagerSync(); 45 manager_ = new MailboxManagerSync();
44 DCHECK(manager_->UsesSync()); 46 DCHECK(manager_->UsesSync());
45 } 47 }
46 48
47 void TearDown() override { GpuServiceTest::TearDown(); } 49 void TearDown() override { GpuServiceTest::TearDown(); }
48 50
49 Texture* CreateTexture() { 51 Texture* CreateTexture() {
50 return new Texture(1); 52 return new Texture(1);
51 } 53 }
52 54
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 DestroyTexture(texture2); 690 DestroyTexture(texture2);
689 DestroyTexture(new_texture); 691 DestroyTexture(new_texture);
690 } 692 }
691 693
692 // TODO: Texture::level_infos_[][].size() 694 // TODO: Texture::level_infos_[][].size()
693 695
694 // TODO: unsupported targets and formats 696 // TODO: unsupported targets and formats
695 697
696 } // namespace gles2 698 } // namespace gles2
697 } // namespace gpu 699 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698