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

Side by Side Diff: gpu/demos/framework/window.cc

Issue 10007034: aura: Change shared context to be offscreen for arm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/demos/framework/window.h" 5 #include "gpu/demos/framework/window.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return false; 87 return false;
88 88
89 context_ = gfx::GLContext::CreateGLContext( 89 context_ = gfx::GLContext::CreateGLContext(
90 NULL, surface_.get(), gfx::PreferDiscreteGpu); 90 NULL, surface_.get(), gfx::PreferDiscreteGpu);
91 if (!context_.get()) 91 if (!context_.get())
92 return false; 92 return false;
93 93
94 std::vector<int32> attribs; 94 std::vector<int32> attribs;
95 if (!decoder_->Initialize(surface_.get(), 95 if (!decoder_->Initialize(surface_.get(),
96 context_.get(), 96 context_.get(),
97 surface_->IsOffscreen(),
97 gfx::Size(), 98 gfx::Size(),
98 gpu::gles2::DisallowedFeatures(), 99 gpu::gles2::DisallowedFeatures(),
99 NULL, 100 NULL,
100 attribs)) { 101 attribs)) {
101 return false; 102 return false;
102 } 103 }
103 104
104 command_buffer_->SetPutOffsetChangeCallback( 105 command_buffer_->SetPutOffsetChangeCallback(
105 base::Bind(&GpuScheduler::PutChanged, 106 base::Bind(&GpuScheduler::PutChanged,
106 base::Unretained(gpu_scheduler_.get()))); 107 base::Unretained(gpu_scheduler_.get())));
(...skipping 22 matching lines...) Expand all
129 kTransferBufferSize, 130 kTransferBufferSize,
130 kTransferBufferSize)) { 131 kTransferBufferSize)) {
131 return false; 132 return false;
132 } 133 }
133 134
134 return true; 135 return true;
135 } 136 }
136 137
137 } // namespace demos 138 } // namespace demos
138 } // namespace gpu 139 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698