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

Unified Diff: gpu/ipc/service/gpu_command_buffer_stub.cc

Issue 2761153002: Ignore custom offscreen surface unless explicitly opted in (Closed)
Patch Set: Created 3 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 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: gpu/ipc/service/gpu_command_buffer_stub.cc
diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc
index 6d305cf9ab99b670e9d8c743e9ad21c6cbd1161d..3880471c187d9058f1411da6f56d13469eebb0b7 100644
--- a/gpu/ipc/service/gpu_command_buffer_stub.cc
+++ b/gpu/ipc/service/gpu_command_buffer_stub.cc
@@ -655,6 +655,15 @@ bool GpuCommandBufferStub::Initialize(
decoder_->set_engine(executor_.get());
if (offscreen) {
+#if defined(OS_ANDROID)
+ // This code isn't really platform specific, but apparently NaCl
+ // plugins on Ozone requested custom attributes for offscreen
+ // surfaces even though there is no implementation to apply these
+ // features. For now, continue ignoring the attributes for
jbauman 2017/03/21 00:51:41 I think what's happening with NaCL is that the GLE
+ // backwards compatibility. TODO(klausw,crbug.com/699664): remove
+ // the Android conditional once it's generally supported, and/or
+ // add a separate use_own_surface boolean attribute to make this
+ // explicitly opt-in.
if (init_params.attribs.depth_size > 0) {
surface_format.SetDepthBits(init_params.attribs.depth_size);
}
@@ -664,6 +673,7 @@ bool GpuCommandBufferStub::Initialize(
if (init_params.attribs.stencil_size > 0) {
surface_format.SetStencilBits(init_params.attribs.stencil_size);
}
+#endif
// Currently, we can't separately control alpha channel for surfaces,
// it's generally enabled by default except for RGB565 and (on desktop)
// smaller-than-32bit formats.
« 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