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

Side by Side Diff: Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp

Issue 11639008: Merge 136332 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 | « 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return m_context; 63 return m_context;
64 } 64 }
65 65
66 PassRefPtr<GraphicsContext3D> createContext() 66 PassRefPtr<GraphicsContext3D> createContext()
67 { 67 {
68 GraphicsContext3D::Attributes attributes; 68 GraphicsContext3D::Attributes attributes;
69 attributes.depth = false; 69 attributes.depth = false;
70 attributes.stencil = true; 70 attributes.stencil = true;
71 attributes.antialias = false; 71 attributes.antialias = false;
72 attributes.shareResources = true; 72 attributes.shareResources = true;
73 attributes.preferDiscreteGPU = true;
74 m_context = GraphicsContext3D::create(attributes, 0); 73 m_context = GraphicsContext3D::create(attributes, 0);
75 return m_context; 74 return m_context;
76 } 75 }
77 private: 76 private:
78 RefPtr<GraphicsContext3D> m_context; 77 RefPtr<GraphicsContext3D> m_context;
79 }; 78 };
80 79
81 PassRefPtr<GraphicsContext3D> SharedGraphicsContext3D::get() 80 PassRefPtr<GraphicsContext3D> SharedGraphicsContext3D::get()
82 { 81 {
83 DEFINE_STATIC_LOCAL(SharedGraphicsContext3DImpl, impl, ()); 82 DEFINE_STATIC_LOCAL(SharedGraphicsContext3DImpl, impl, ());
(...skipping 23 matching lines...) Expand all
107 } 106 }
108 107
109 bool SharedGraphicsContext3D::createForImplThread() 108 bool SharedGraphicsContext3D::createForImplThread()
110 { 109 {
111 ASSERT(isMainThread()); 110 ASSERT(isMainThread());
112 return getOrCreateContextForImplThread(Create); 111 return getOrCreateContextForImplThread(Create);
113 } 112 }
114 113
115 } 114 }
116 115
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