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

Unified Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.cc

Issue 395133006: Android WebView: Fix some GLSL WebGL conformance tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/in_process/synchronous_compositor_factory_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
index 4449ca19fa4df556499d5dc7f75fd10d6e6b8da0..f8c0642e7a4187af6ab992fc95ea0b8e9bace10d 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
@@ -86,6 +86,18 @@ scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> WrapContext(
context.Pass(), GetDefaultAttribs()));
}
+scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
+WrapContextWithAttributes(
+ scoped_ptr<gpu::GLInProcessContext> context,
+ const blink::WebGraphicsContext3D::Attributes& attributes) {
+ if (!context.get())
+ return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>();
+
+ return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>(
+ WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext(
+ context.Pass(), attributes));
+}
+
class VideoContextProvider
: public StreamTextureFactorySynchronousImpl::ContextProvider {
public:
@@ -203,7 +215,8 @@ SynchronousCompositorFactoryImpl::CreateStreamTextureFactory(int frame_id) {
blink::WebGraphicsContext3D*
SynchronousCompositorFactoryImpl::CreateOffscreenGraphicsContext3D(
const blink::WebGraphicsContext3D::Attributes& attributes) {
- return WrapContext(CreateOffscreenContext(attributes)).release();
+ return WrapContextWithAttributes(CreateOffscreenContext(attributes),
+ attributes).release();
}
void SynchronousCompositorFactoryImpl::CompositorInitializedHardwareDraw() {
« 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