OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |