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

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

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 namespace gpu { 7 namespace gpu {
8 namespace gles2 { 8 namespace gles2 {
9 9
10 GLES2DecoderPassthroughImpl::GLES2DecoderPassthroughImpl(ContextGroup* group) 10 GLES2DecoderPassthroughImpl::GLES2DecoderPassthroughImpl(ContextGroup* group)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (command_id >= kFirstGLES2Command && command_id < kNumCommands) { 86 if (command_id >= kFirstGLES2Command && command_id < kNumCommands) {
87 return gles2::GetCommandName(static_cast<CommandId>(command_id)); 87 return gles2::GetCommandName(static_cast<CommandId>(command_id));
88 } 88 }
89 return GetCommonCommandName(static_cast<cmd::CommandId>(command_id)); 89 return GetCommonCommandName(static_cast<cmd::CommandId>(command_id));
90 } 90 }
91 91
92 bool GLES2DecoderPassthroughImpl::Initialize( 92 bool GLES2DecoderPassthroughImpl::Initialize(
93 const scoped_refptr<gl::GLSurface>& surface, 93 const scoped_refptr<gl::GLSurface>& surface,
94 const scoped_refptr<gl::GLContext>& context, 94 const scoped_refptr<gl::GLContext>& context,
95 bool offscreen, 95 bool offscreen,
96 const gfx::Size& offscreen_size,
96 const DisallowedFeatures& disallowed_features, 97 const DisallowedFeatures& disallowed_features,
97 const ContextCreationAttribHelper& attrib_helper) { 98 const ContextCreationAttribHelper& attrib_helper) {
98 // Take ownership of the context and surface. The surface can be replaced 99 // Take ownership of the context and surface. The surface can be replaced
99 // with SetSurface. 100 // with SetSurface.
100 context_ = context; 101 context_ = context;
101 surface_ = surface; 102 surface_ = surface;
102 103
103 if (!group_->Initialize(this, attrib_helper.context_type, 104 if (!group_->Initialize(this, attrib_helper.context_type,
104 disallowed_features)) { 105 disallowed_features)) {
105 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. 106 group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 }, /* NOLINT */ 374 }, /* NOLINT */
374 375
375 const GLES2DecoderPassthroughImpl::CommandInfo 376 const GLES2DecoderPassthroughImpl::CommandInfo
376 GLES2DecoderPassthroughImpl::command_info[] = { 377 GLES2DecoderPassthroughImpl::command_info[] = {
377 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; 378 GLES2_COMMAND_LIST(GLES2_CMD_OP)};
378 379
379 #undef GLES2_CMD_OP 380 #undef GLES2_CMD_OP
380 381
381 } // namespace gles2 382 } // namespace gles2
382 } // namespace gpu 383 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698