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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.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) 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,
97 const DisallowedFeatures& disallowed_features, 96 const DisallowedFeatures& disallowed_features,
98 const ContextCreationAttribHelper& attrib_helper) { 97 const ContextCreationAttribHelper& attrib_helper) {
99 // Take ownership of the context and surface. The surface can be replaced 98 // Take ownership of the context and surface. The surface can be replaced
100 // with SetSurface. 99 // with SetSurface.
101 context_ = context; 100 context_ = context;
102 surface_ = surface; 101 surface_ = surface;
103 102
104 if (!group_->Initialize(this, attrib_helper.context_type, 103 if (!group_->Initialize(this, attrib_helper.context_type,
105 disallowed_features)) { 104 disallowed_features)) {
106 group_ = NULL; // Must not destroy ContextGroup if it is not initialized. 105 group_ = NULL; // Must not destroy ContextGroup if it is not initialized.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 }, /* NOLINT */ 373 }, /* NOLINT */
375 374
376 const GLES2DecoderPassthroughImpl::CommandInfo 375 const GLES2DecoderPassthroughImpl::CommandInfo
377 GLES2DecoderPassthroughImpl::command_info[] = { 376 GLES2DecoderPassthroughImpl::command_info[] = {
378 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; 377 GLES2_COMMAND_LIST(GLES2_CMD_OP)};
379 378
380 #undef GLES2_CMD_OP 379 #undef GLES2_CMD_OP
381 380
382 } // namespace gles2 381 } // namespace gles2
383 } // namespace gpu 382 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698