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

Unified Diff: cc/test/test_in_process_context_provider.cc

Issue 1864373002: Remove unused features for in-process GL contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inproclost: callback 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/test_in_process_context_provider.cc
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index c9358b1f3c1716a95e53e411550cec4f53f9d4ae..fa673726851445a6b7a2ffda3242942c9afdea80 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -26,9 +26,9 @@ namespace cc {
// static
scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
- TestImageFactory* image_factory) {
+ TestImageFactory* image_factory,
+ gpu::GLInProcessContext* shared_context) {
const bool is_offscreen = true;
- const bool share_resources = true;
gpu::gles2::ContextCreationAttribHelper attribs;
attribs.alpha_size = 8;
attribs.blue_size = 8;
@@ -44,31 +44,25 @@ scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
scoped_ptr<gpu::GLInProcessContext> context =
make_scoped_ptr(gpu::GLInProcessContext::Create(
- NULL,
- NULL,
- is_offscreen,
- gfx::kNullAcceleratedWidget,
- gfx::Size(1, 1),
- NULL,
- share_resources,
- attribs,
- gpu_preference,
+ nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget,
+ gfx::Size(1, 1), shared_context, attribs, gpu_preference,
gpu::GLInProcessContextSharedMemoryLimits(),
- gpu_memory_buffer_manager,
- image_factory));
+ gpu_memory_buffer_manager, image_factory));
DCHECK(context);
return context;
}
scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
- return CreateTestInProcessContext(nullptr, nullptr);
+ return CreateTestInProcessContext(nullptr, nullptr, nullptr);
}
-TestInProcessContextProvider::TestInProcessContextProvider()
- : context_(CreateTestInProcessContext(&gpu_memory_buffer_manager_,
- &image_factory_)) {
-}
+TestInProcessContextProvider::TestInProcessContextProvider(
+ TestInProcessContextProvider* shared_context)
+ : context_(CreateTestInProcessContext(
+ &gpu_memory_buffer_manager_,
+ &image_factory_,
+ (shared_context ? shared_context->context_.get() : nullptr))) {}
TestInProcessContextProvider::~TestInProcessContextProvider() {
if (gr_context_)

Powered by Google App Engine
This is Rietveld 408576698