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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2107783003: Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp fix Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 attribs.depth_size = normalized_init.request_depth ? 24 : 0; 461 attribs.depth_size = normalized_init.request_depth ? 24 : 0;
462 attribs.stencil_size = normalized_init.request_stencil ? 8 : 0; 462 attribs.stencil_size = normalized_init.request_stencil ? 8 : 0;
463 attribs.lose_context_when_out_of_memory = 463 attribs.lose_context_when_out_of_memory =
464 normalized_init.lose_context_when_out_of_memory; 464 normalized_init.lose_context_when_out_of_memory;
465 attribs.context_type = init.context_type; 465 attribs.context_type = init.context_type;
466 466
467 decoder_.reset(GLES2Decoder::Create(group_.get())); 467 decoder_.reset(GLES2Decoder::Create(group_.get()));
468 decoder_->SetIgnoreCachedStateForTest(ignore_cached_state_for_test_); 468 decoder_->SetIgnoreCachedStateForTest(ignore_cached_state_for_test_);
469 decoder_->GetLogger()->set_log_synthesized_gl_errors(false); 469 decoder_->GetLogger()->set_log_synthesized_gl_errors(false);
470 ASSERT_TRUE(decoder_->Initialize(surface_, context_, false, 470 ASSERT_TRUE(decoder_->Initialize(surface_, context_, false,
471 surface_->GetSize(), DisallowedFeatures(), 471 DisallowedFeatures(), attribs));
472 attribs));
473 472
474 EXPECT_CALL(*context_, MakeCurrent(surface_.get())).WillOnce(Return(true)); 473 EXPECT_CALL(*context_, MakeCurrent(surface_.get())).WillOnce(Return(true));
475 if (context_->WasAllocatedUsingRobustnessExtension()) { 474 if (context_->WasAllocatedUsingRobustnessExtension()) {
476 EXPECT_CALL(*gl_, GetGraphicsResetStatusARB()) 475 EXPECT_CALL(*gl_, GetGraphicsResetStatusARB())
477 .WillOnce(Return(GL_NO_ERROR)); 476 .WillOnce(Return(GL_NO_ERROR));
478 } 477 }
479 decoder_->MakeCurrent(); 478 decoder_->MakeCurrent();
480 decoder_->set_engine(engine_.get()); 479 decoder_->set_engine(engine_.get());
481 decoder_->BeginDecoding(); 480 decoder_->BeginDecoding();
482 481
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 SetupDefaultProgram(); 2079 SetupDefaultProgram();
2081 } 2080 }
2082 2081
2083 // Include the auto-generated part of this file. We split this because it means 2082 // Include the auto-generated part of this file. We split this because it means
2084 // we can easily edit the non-auto generated parts right here in this file 2083 // we can easily edit the non-auto generated parts right here in this file
2085 // instead of having to edit some template or the code generator. 2084 // instead of having to edit some template or the code generator.
2086 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2085 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2087 2086
2088 } // namespace gles2 2087 } // namespace gles2
2089 } // namespace gpu 2088 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698