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

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

Issue 9160012: Change PluginWindowHandle to AcceleratedWidget in ui/gfx/gl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops mac Created 8 years, 10 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/demos/framework/window.h ('k') | gpu/demos/framework/window_linux.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 demo_->Resize(width, height); 51 demo_->Resize(width, height);
52 return demo_->InitGL(); 52 return demo_->InitGL();
53 } 53 }
54 54
55 void Window::OnPaint() { 55 void Window::OnPaint() {
56 demo_->Draw(); 56 demo_->Draw();
57 ::gles2::GetGLContext()->SwapBuffers(); 57 ::gles2::GetGLContext()->SwapBuffers();
58 } 58 }
59 59
60 bool Window::CreateRenderContext(gfx::PluginWindowHandle hwnd) { 60 bool Window::CreateRenderContext(gfx::AcceleratedWidget hwnd) {
61 command_buffer_.reset(new CommandBufferService); 61 command_buffer_.reset(new CommandBufferService);
62 if (!command_buffer_->Initialize()) { 62 if (!command_buffer_->Initialize()) {
63 return false; 63 return false;
64 } 64 }
65 65
66 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true)); 66 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true));
67 67
68 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 68 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
69 if (!decoder_.get()) 69 if (!decoder_.get())
70 return false; 70 return false;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 kTransferBufferSize, 121 kTransferBufferSize,
122 kTransferBufferSize)) { 122 kTransferBufferSize)) {
123 return false; 123 return false;
124 } 124 }
125 125
126 return true; 126 return true;
127 } 127 }
128 128
129 } // namespace demos 129 } // namespace demos
130 } // namespace gpu 130 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/demos/framework/window.h ('k') | gpu/demos/framework/window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698