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

Side by Side Diff: content/browser/gpu/gpu_ipc_browsertests.cc

Issue 470973002: gpu: Remove WebGraphicsContext3D::makeContextCurrent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix in unittests Created 6 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
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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 7 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
8 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 8 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
9 #include "content/common/gpu/client/context_provider_command_buffer.h" 9 #include "content/common/gpu/client/context_provider_command_buffer.h"
10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
(...skipping 29 matching lines...) Expand all
40 factory->EstablishGpuChannelSync(kInitCause)); 40 factory->EstablishGpuChannelSync(kInitCause));
41 context_.reset( 41 context_.reset(
42 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 42 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
43 gpu_channel_host.get(), 43 gpu_channel_host.get(),
44 blink::WebGraphicsContext3D::Attributes(), 44 blink::WebGraphicsContext3D::Attributes(),
45 lose_context_when_out_of_memory, 45 lose_context_when_out_of_memory,
46 GURL(), 46 GURL(),
47 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), 47 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
48 NULL)); 48 NULL));
49 CHECK(context_.get()); 49 CHECK(context_.get());
50 context_->makeContextCurrent(); 50 context_->InitializeOnCurrentThread();
51 context_support_ = context_->GetContextSupport(); 51 context_support_ = context_->GetContextSupport();
52 ContentBrowserTest::SetUpOnMainThread(); 52 ContentBrowserTest::SetUpOnMainThread();
53 } 53 }
54 54
55 virtual void TearDownOnMainThread() OVERRIDE { 55 virtual void TearDownOnMainThread() OVERRIDE {
56 // Must delete the context first. 56 // Must delete the context first.
57 context_.reset(NULL); 57 context_.reset(NULL);
58 ContentBrowserTest::TearDownOnMainThread(); 58 ContentBrowserTest::TearDownOnMainThread();
59 } 59 }
60 60
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 shim->SimulateCrash(); 186 shim->SimulateCrash();
187 run_loop.Run(); 187 run_loop.Run();
188 188
189 EXPECT_EQ(1, counter); 189 EXPECT_EQ(1, counter);
190 EXPECT_FALSE(IsChannelEstablished()); 190 EXPECT_FALSE(IsChannelEstablished());
191 EstablishAndWait(); 191 EstablishAndWait();
192 EXPECT_TRUE(IsChannelEstablished()); 192 EXPECT_TRUE(IsChannelEstablished());
193 } 193 }
194 194
195 } // namespace content 195 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698