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

Unified Diff: plugin/mac/o3d_layer.mm

Issue 2740011: Fix issue in Safari 5 on Mac OS X 10.6 on Mac Minis where drawInCGLContext/co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 6 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: plugin/mac/o3d_layer.mm
===================================================================
--- plugin/mac/o3d_layer.mm (revision 49727)
+++ plugin/mac/o3d_layer.mm (working copy)
@@ -115,14 +115,16 @@
* renderers from pixel format 'pixelFormat'. The default implementation
* allocates a new context with a null share context. */
- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat {
- CGLContextObj share_context = obj_->GetFullscreenShareContext();
- DCHECK(share_context);
- if (CGLCreateContext(pixelFormat, share_context, &glContext_) !=
- kCGLNoError) {
- glContext_ = [super copyCGLContextForPixelFormat:pixelFormat];
+ if (glContext_ == NULL) {
+ CGLContextObj share_context = obj_->GetFullscreenShareContext();
+ DCHECK(share_context);
+ if (CGLCreateContext(pixelFormat, share_context, &glContext_) !=
+ kCGLNoError) {
+ glContext_ = [super copyCGLContextForPixelFormat:pixelFormat];
+ }
+ obj_->SetMacCGLContext(glContext_);
+ created_context_ = true;
}
- obj_->SetMacCGLContext(glContext_);
- created_context_ = true;
return glContext_;
}
« 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