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

Side by Side Diff: chrome/renderer/pepper_platform_context_3d_impl.cc

Issue 6588056: Allow GL extensions in PPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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) 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 "chrome/renderer/pepper_platform_context_3d_impl.h" 5 #include "chrome/renderer/pepper_platform_context_3d_impl.h"
6 6
7 #include "chrome/renderer/command_buffer_proxy.h" 7 #include "chrome/renderer/command_buffer_proxy.h"
8 #include "chrome/renderer/ggl/ggl.h" 8 #include "chrome/renderer/ggl/ggl.h"
9 #include "chrome/renderer/gpu_channel_host.h" 9 #include "chrome/renderer/gpu_channel_host.h"
10 #include "chrome/renderer/render_thread.h" 10 #include "chrome/renderer/render_thread.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ggl::GGL_SAMPLES, 0, 62 ggl::GGL_SAMPLES, 0,
63 ggl::GGL_SAMPLE_BUFFERS, 0, 63 ggl::GGL_SAMPLE_BUFFERS, 0,
64 ggl::GGL_NONE, 64 ggl::GGL_NONE,
65 }; 65 };
66 std::vector<int32> attribs(kAttribs, kAttribs + ARRAYSIZE_UNSAFE(kAttribs)); 66 std::vector<int32> attribs(kAttribs, kAttribs + ARRAYSIZE_UNSAFE(kAttribs));
67 CommandBufferProxy* parent_command_buffer = 67 CommandBufferProxy* parent_command_buffer =
68 ggl::GetCommandBufferProxy(parent_context_); 68 ggl::GetCommandBufferProxy(parent_context_);
69 command_buffer_ = channel_->CreateOffscreenCommandBuffer( 69 command_buffer_ = channel_->CreateOffscreenCommandBuffer(
70 parent_command_buffer, 70 parent_command_buffer,
71 gfx::Size(1, 1), 71 gfx::Size(1, 1),
72 "", 72 "*",
73 attribs, 73 attribs,
74 parent_texture_id_); 74 parent_texture_id_);
75 75
76 if (!command_buffer_) 76 if (!command_buffer_)
77 return false; 77 return false;
78 78
79 return true; 79 return true;
80 } 80 }
81 81
82 void PlatformContext3DImpl::SetSwapBuffersCallback(Callback0::Type* callback) { 82 void PlatformContext3DImpl::SetSwapBuffersCallback(Callback0::Type* callback) {
83 DCHECK(command_buffer_); 83 DCHECK(command_buffer_);
84 command_buffer_->SetSwapBuffersCallback(callback); 84 command_buffer_->SetSwapBuffersCallback(callback);
85 } 85 }
86 86
87 unsigned PlatformContext3DImpl::GetBackingTextureId() { 87 unsigned PlatformContext3DImpl::GetBackingTextureId() {
88 DCHECK(command_buffer_); 88 DCHECK(command_buffer_);
89 return parent_texture_id_; 89 return parent_texture_id_;
90 } 90 }
91 91
92 gpu::CommandBuffer* 92 gpu::CommandBuffer*
93 PlatformContext3DImpl::GetCommandBuffer() { 93 PlatformContext3DImpl::GetCommandBuffer() {
94 return command_buffer_; 94 return command_buffer_;
95 } 95 }
96 96
97 #endif // ENABLE_GPU 97 #endif // ENABLE_GPU
98 98
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698