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

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

Issue 6711013: Fix crash with pepper 3D on multiple windows in same renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« content/renderer/ggl.h ('K') | « content/renderer/ggl.h ('k') | 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 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ggl.h" 5 #include "content/renderer/ggl.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/weak_ptr.h" 9 #include "base/weak_ptr.h"
10 #include "chrome/renderer/command_buffer_proxy.h" 10 #include "chrome/renderer/command_buffer_proxy.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 if (!context) 553 if (!context)
554 return false; 554 return false;
555 555
556 delete context; 556 delete context;
557 return true; 557 return true;
558 #else 558 #else
559 return false; 559 return false;
560 #endif 560 #endif
561 } 561 }
562 562
563 base::WeakPtr<Context> GetWeakContextReference(Context* context) {
564 #if defined(ENABLE_GPU)
565 return context ? context->AsWeakPtr() : base::WeakPtr<Context>();
566 #else
567 return base::WeakPtr<Context>();
568 #endif
569 }
570
563 media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context) { 571 media::VideoDecodeEngine* CreateVideoDecodeEngine(Context* context) {
564 return context->CreateVideoDecodeEngine(); 572 return context->CreateVideoDecodeEngine();
565 } 573 }
566 574
567 media::VideoDecodeContext* CreateVideoDecodeContext( 575 media::VideoDecodeContext* CreateVideoDecodeContext(
568 Context* context, MessageLoop* message_loop, bool hardware_decoder) { 576 Context* context, MessageLoop* message_loop, bool hardware_decoder) {
569 return context->CreateVideoDecodeContext(message_loop, hardware_decoder); 577 return context->CreateVideoDecodeContext(message_loop, hardware_decoder);
570 } 578 }
571 579
572 Error GetError(Context* context) { 580 Error GetError(Context* context) {
(...skipping 23 matching lines...) Expand all
596 604
597 return context->gles2_implementation(); 605 return context->gles2_implementation();
598 } 606 }
599 607
600 CommandBufferProxy* GetCommandBufferProxy(Context* context) { 608 CommandBufferProxy* GetCommandBufferProxy(Context* context) {
601 DCHECK(context); 609 DCHECK(context);
602 return context->command_buffer(); 610 return context->command_buffer();
603 } 611 }
604 612
605 } // namespace ggl 613 } // namespace ggl
OLDNEW
« content/renderer/ggl.h ('K') | « content/renderer/ggl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698