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

Unified Diff: content/common/gpu/client/gpu_in_process_context_tests.cc

Issue 1807813002: Remove WebGraphicsContext3D dependency in gpu_context_tests.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d-unused
Patch Set: Created 4 years, 9 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
« no previous file with comments | « content/common/gpu/client/gpu_context_tests.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_in_process_context_tests.cc
diff --git a/content/common/gpu/client/gpu_in_process_context_tests.cc b/content/common/gpu/client/gpu_in_process_context_tests.cc
index f9733e3db76fe96cafc4ed69f0f8b3ab1aa9e03b..365f096053fda47cd6432b1df819b9ca858011c3 100644
--- a/content/common/gpu/client/gpu_in_process_context_tests.cc
+++ b/content/common/gpu/client/gpu_in_process_context_tests.cc
@@ -7,31 +7,51 @@
#include <string>
#include <vector>
-#include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
+#include "gpu/command_buffer/client/gl_in_process_context.h"
+#include "gpu/command_buffer/client/gles2_implementation.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_surface.h"
namespace {
-using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl;
-
class ContextTestBase : public testing::Test {
public:
void SetUp() override {
- blink::WebGraphicsContext3D::Attributes attributes;
- bool lose_context_when_out_of_memory = false;
- typedef WebGraphicsContext3DInProcessCommandBufferImpl WGC3DIPCBI;
- context_ = WGC3DIPCBI::CreateOffscreenContext(
- attributes, lose_context_when_out_of_memory);
- context_->InitializeOnCurrentThread();
- context_support_ = context_->GetContextSupport();
+ gpu::gles2::ContextCreationAttribHelper attributes;
+ attributes.alpha_size = 8;
+ attributes.depth_size = 24;
+ attributes.red_size = 8;
+ attributes.green_size = 8;
+ attributes.blue_size = 8;
+ attributes.stencil_size = 8;
+ attributes.samples = 4;
+ attributes.sample_buffers = 1;
+ attributes.bind_generates_resource = false;
+
+ context_.reset(gpu::GLInProcessContext::Create(
+ nullptr, /* service */
+ nullptr, /* surface */
+ true, /* offscreen */
+ gfx::kNullAcceleratedWidget, /* window */
+ gfx::Size(1, 1), /* size */
+ nullptr, /* share_context */
+ true, /* use_global_share_group */
+ attributes, gfx::PreferDiscreteGpu,
+ ::gpu::GLInProcessContextSharedMemoryLimits(),
+ nullptr, /* gpu_memory_buffer_manager */
+ nullptr /* image_factory */));
+ gl_ = context_->GetImplementation();
+ context_support_ = context_->GetImplementation();
}
void TearDown() override { context_.reset(NULL); }
protected:
- scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context_;
+ gpu::gles2::GLES2Interface* gl_;
gpu::ContextSupport* context_support_;
+
+ private:
+ scoped_ptr<gpu::GLInProcessContext> context_;
};
} // namespace
« no previous file with comments | « content/common/gpu/client/gpu_context_tests.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698