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

Side by Side Diff: webkit/gpu/context_provider_in_process.cc

Issue 14048018: Add create WGC3DInProcessCommandBuffer for on-screen context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove out-of-date comment. Created 7 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
« no previous file with comments | « cc/test/pixel_test.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "webkit/gpu/context_provider_in_process.h" 5 #include "webkit/gpu/context_provider_in_process.h"
6 6
7 #include "webkit/gpu/grcontext_for_webgraphicscontext3d.h" 7 #include "webkit/gpu/grcontext_for_webgraphicscontext3d.h"
8 8
9 namespace webkit { 9 namespace webkit {
10 namespace gpu { 10 namespace gpu {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool ContextProviderInProcess::InitializeOnMainThread() { 52 bool ContextProviderInProcess::InitializeOnMainThread() {
53 DCHECK(!context3d_); 53 DCHECK(!context3d_);
54 54
55 WebKit::WebGraphicsContext3D::Attributes attributes; 55 WebKit::WebGraphicsContext3D::Attributes attributes;
56 attributes.depth = false; 56 attributes.depth = false;
57 attributes.stencil = true; 57 attributes.stencil = true;
58 attributes.antialias = false; 58 attributes.antialias = false;
59 attributes.shareResources = true; 59 attributes.shareResources = true;
60 attributes.noAutomaticFlushes = true; 60 attributes.noAutomaticFlushes = true;
61 61
62 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl;
62 context3d_.reset( 63 context3d_.reset(
63 new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl( 64 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
64 attributes)); 65 attributes));
65 66
66 return context3d_; 67 return context3d_;
67 } 68 }
68 69
69 bool ContextProviderInProcess::BindToCurrentThread() { 70 bool ContextProviderInProcess::BindToCurrentThread() {
70 DCHECK(context3d_); 71 DCHECK(context3d_);
71 72
72 if (lost_context_callback_proxy_) 73 if (lost_context_callback_proxy_)
73 return true; 74 return true;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 125 }
125 126
126 void ContextProviderInProcess::OnMemoryAllocationChanged( 127 void ContextProviderInProcess::OnMemoryAllocationChanged(
127 bool nonzero_allocation) { 128 bool nonzero_allocation) {
128 if (gr_context_) 129 if (gr_context_)
129 gr_context_->SetMemoryLimit(nonzero_allocation); 130 gr_context_->SetMemoryLimit(nonzero_allocation);
130 } 131 }
131 132
132 } // namespace gpu 133 } // namespace gpu
133 } // namespace webkit 134 } // namespace webkit
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698