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

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 7669072: Use 3D graphics context shareResources flag to decide whether a context should share resources. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/render_widget_fullscreen_pepper.h" 5 #include "content/renderer/render_widget_fullscreen_pepper.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/renderer/gpu/gpu_channel_host.h" 9 #include "content/renderer/gpu/gpu_channel_host.h"
10 #include "content/renderer/pepper_platform_context_3d_impl.h" 10 #include "content/renderer/pepper_platform_context_3d_impl.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 GpuChannelHost* host = render_thread->EstablishGpuChannelSync( 341 GpuChannelHost* host = render_thread->EstablishGpuChannelSync(
342 content::CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); 342 content::CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT);
343 if (!host) 343 if (!host)
344 return; 344 return;
345 const int32 attribs[] = { 345 const int32 attribs[] = {
346 RendererGLContext::ALPHA_SIZE, 8, 346 RendererGLContext::ALPHA_SIZE, 8,
347 RendererGLContext::DEPTH_SIZE, 0, 347 RendererGLContext::DEPTH_SIZE, 0,
348 RendererGLContext::STENCIL_SIZE, 0, 348 RendererGLContext::STENCIL_SIZE, 0,
349 RendererGLContext::SAMPLES, 0, 349 RendererGLContext::SAMPLES, 0,
350 RendererGLContext::SAMPLE_BUFFERS, 0, 350 RendererGLContext::SAMPLE_BUFFERS, 0,
351 RendererGLContext::SHARE_RESOURCES, 0,
352 RendererGLContext::BIND_GENERATES_RESOURCES, 1,
piman 2011/08/26 23:18:57 I think this was false before (the default), do we
apatrick_chromium 2011/08/26 23:40:01 False referred to whether resource sharing was ena
piman 2011/08/27 00:40:42 This is for the full-screen "compositor" (which sc
351 RendererGLContext::NONE, 353 RendererGLContext::NONE,
352 }; 354 };
353 context_ = RendererGLContext::CreateViewContext( 355 context_ = RendererGLContext::CreateViewContext(
354 host, 356 host,
355 routing_id(), 357 routing_id(),
356 false,
357 NULL, 358 NULL,
358 "GL_OES_packed_depth_stencil GL_OES_depth24", 359 "GL_OES_packed_depth_stencil GL_OES_depth24",
359 attribs, 360 attribs,
360 active_url_); 361 active_url_);
361 if (!context_) 362 if (!context_)
362 return; 363 return;
363 364
364 if (!InitContext()) { 365 if (!InitContext()) {
365 DestroyContext(context_, program_, buffer_); 366 DestroyContext(context_, program_, buffer_);
366 context_ = NULL; 367 context_ = NULL;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 context_ = NULL; 496 context_ = NULL;
496 program_ = 0; 497 program_ = 0;
497 buffer_ = 0; 498 buffer_ = 0;
498 OnSwapBuffersAborted(); 499 OnSwapBuffersAborted();
499 CheckCompositing(); 500 CheckCompositing();
500 } 501 }
501 502
502 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { 503 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() {
503 OnSwapBuffersComplete(); 504 OnSwapBuffersComplete();
504 } 505 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698