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

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

Issue 6623063: Connect up --disable-gl-multisampling to command buffer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix style. Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/gfx/gl/gl_context.h" 5 #include "app/gfx/gl/gl_context.h"
6 #include "gpu/command_buffer/service/gpu_processor.h" 6 #include "gpu/command_buffer/service/gpu_processor.h"
7 7
8 using ::base::SharedMemory; 8 using ::base::SharedMemory;
9 9
10 namespace gpu { 10 namespace gpu {
11 11
12 bool GPUProcessor::Initialize(gfx::PluginWindowHandle window, 12 bool GPUProcessor::Initialize(
13 const gfx::Size& size, 13 gfx::PluginWindowHandle window,
14 const char* allowed_extensions, 14 const gfx::Size& size,
15 const std::vector<int32>& attribs, 15 const gles2::DisallowedExtensions& disallowed_extensions,
16 GPUProcessor* parent, 16 const char* allowed_extensions,
17 uint32 parent_texture_id) { 17 const std::vector<int32>& attribs,
18 GPUProcessor* parent,
19 uint32 parent_texture_id) {
18 // Get the parent decoder and the GLContext to share IDs with, if any. 20 // Get the parent decoder and the GLContext to share IDs with, if any.
19 gles2::GLES2Decoder* parent_decoder = NULL; 21 gles2::GLES2Decoder* parent_decoder = NULL;
20 gfx::GLContext* parent_context = NULL; 22 gfx::GLContext* parent_context = NULL;
21 if (parent) { 23 if (parent) {
22 parent_decoder = parent->decoder_.get(); 24 parent_decoder = parent->decoder_.get();
23 DCHECK(parent_decoder); 25 DCHECK(parent_decoder);
24 26
25 parent_context = parent_decoder->GetGLContext(); 27 parent_context = parent_decoder->GetGLContext();
26 DCHECK(parent_context); 28 DCHECK(parent_context);
27 } 29 }
(...skipping 18 matching lines...) Expand all
46 if (!surface_->Initialize(context.get(), false)) { 48 if (!surface_->Initialize(context.get(), false)) {
47 LOG(ERROR) << "GPUProcessor::Initialize failed to " 49 LOG(ERROR) << "GPUProcessor::Initialize failed to "
48 << "initialize AcceleratedSurface."; 50 << "initialize AcceleratedSurface.";
49 Destroy(); 51 Destroy();
50 return false; 52 return false;
51 } 53 }
52 } 54 }
53 55
54 return InitializeCommon(context.release(), 56 return InitializeCommon(context.release(),
55 size, 57 size,
58 disallowed_extensions,
56 allowed_extensions, 59 allowed_extensions,
57 attribs, 60 attribs,
58 parent_decoder, 61 parent_decoder,
59 parent_texture_id); 62 parent_texture_id);
60 } 63 }
61 64
62 void GPUProcessor::Destroy() { 65 void GPUProcessor::Destroy() {
63 if (surface_.get()) { 66 if (surface_.get()) {
64 surface_->Destroy(); 67 surface_->Destroy();
65 surface_.reset(); 68 surface_.reset();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (surface_.get()) { 133 if (surface_.get()) {
131 surface_->SwapBuffers(); 134 surface_->SwapBuffers();
132 } 135 }
133 136
134 if (wrapped_swap_buffers_callback_.get()) { 137 if (wrapped_swap_buffers_callback_.get()) {
135 wrapped_swap_buffers_callback_->Run(); 138 wrapped_swap_buffers_callback_->Run();
136 } 139 }
137 } 140 }
138 141
139 } // namespace gpu 142 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gpu_processor_linux.cc ('k') | gpu/command_buffer/service/gpu_processor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698