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

Unified Diff: cc/test/test_in_process_context_provider.cc

Issue 455783002: GPU context creation code duplication cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 4 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 55e323959031922cf8e5aba619aadaf2edd582d7..2cfda123612e01c284d0131d65bd5c38a94608bc 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -9,6 +9,7 @@
#include "gpu/command_buffer/client/gl_in_process_context.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/gles2_lib.h"
+#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2ext.h"
@@ -22,16 +23,17 @@ namespace cc {
scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
const bool is_offscreen = true;
const bool share_resources = true;
- gpu::GLInProcessContextAttribs attribs;
- attribs.alpha_size = 8;
- attribs.blue_size = 8;
- attribs.green_size = 8;
- attribs.red_size = 8;
- attribs.depth_size = 24;
- attribs.stencil_size = 8;
- attribs.samples = 0;
- attribs.sample_buffers = 0;
- attribs.fail_if_major_perf_caveat = false;
+ gpu::gles2::ContextCreationAttribHelper attribs;
+ attribs.alpha_size_ = 8;
+ attribs.blue_size_ = 8;
+ attribs.green_size_ = 8;
+ attribs.red_size_ = 8;
+ attribs.depth_size_ = 24;
+ attribs.stencil_size_ = 8;
+ attribs.samples_ = 0;
+ attribs.sample_buffers_ = 0;
+ attribs.fail_if_major_perf_caveat_ = false;
+ attribs.bind_generates_resource_ = false;
gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr(

Powered by Google App Engine
This is Rietveld 408576698