OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/compositor/image_transport_factory.h" | 5 #include "content/browser/compositor/image_transport_factory.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "cc/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
10 #include "content/browser/compositor/owned_mailbox.h" | 10 #include "content/browser/compositor/owned_mailbox.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #define MAYBE_LoseOnTearDown LoseOnTearDown | 94 #define MAYBE_LoseOnTearDown LoseOnTearDown |
95 #endif | 95 #endif |
96 // Checks that upon destruction of the ImageTransportFactory, the observer is | 96 // Checks that upon destruction of the ImageTransportFactory, the observer is |
97 // called and the created resources are reset. | 97 // called and the created resources are reset. |
98 IN_PROC_BROWSER_TEST_F(ImageTransportFactoryTearDownBrowserTest, | 98 IN_PROC_BROWSER_TEST_F(ImageTransportFactoryTearDownBrowserTest, |
99 MAYBE_LoseOnTearDown) { | 99 MAYBE_LoseOnTearDown) { |
100 // This test doesn't make sense in software compositing mode. | 100 // This test doesn't make sense in software compositing mode. |
101 if (!GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | 101 if (!GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) |
102 return; | 102 return; |
103 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 103 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
104 display_compositor::GLHelper* helper = factory->GetGLHelper(); | 104 GLHelper* helper = factory->GetGLHelper(); |
105 ASSERT_TRUE(helper); | 105 ASSERT_TRUE(helper); |
106 mailbox_ = new OwnedMailbox(helper); | 106 mailbox_ = new OwnedMailbox(helper); |
107 EXPECT_FALSE(mailbox_->mailbox().IsZero()); | 107 EXPECT_FALSE(mailbox_->mailbox().IsZero()); |
108 } | 108 } |
109 | 109 |
110 } // anonymous namespace | 110 } // anonymous namespace |
111 } // namespace content | 111 } // namespace content |
OLD | NEW |