Bug 72101 - Make GraphicsContext3D::makeContextCurrent return bool
Summary: Make GraphicsContext3D::makeContextCurrent return bool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nat Duca
URL:
Keywords:
Depends on:
Blocks: 72102
  Show dependency treegraph
 
Reported: 2011-11-11 01:23 PST by Nat Duca
Modified: 2011-11-11 20:45 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.18 KB, patch)
2011-11-11 01:24 PST, Nat Duca
no flags Details | Formatted Diff | Diff
Patch for landing (7.38 KB, patch)
2011-11-11 19:46 PST, Nat Duca
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Duca 2011-11-11 01:23:40 PST
Make GraphicsContext3D::makeContextCurrent return bool
Comment 1 Nat Duca 2011-11-11 01:24:22 PST
Created attachment 114647 [details]
Patch
Comment 2 Nat Duca 2011-11-11 01:25:47 PST
This is needed to gracefully recover when making a context current fails.
Comment 3 Kenneth Russell 2011-11-11 12:39:18 PST
Comment on attachment 114647 [details]
Patch

Looks fine. This API change more accurately reflects reality. Please fix the Mac build failure. r=me
Comment 4 Nat Duca 2011-11-11 19:46:57 PST
Created attachment 114815 [details]
Patch for landing
Comment 5 Nico Weber 2011-11-11 20:35:13 PST
Comment on attachment 114815 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=114815&action=review

> Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp:141
>          return;

This will fail to compile.

> Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp:240
>          return;

As will this and the other returns in this function; and it needs a return true at the end.

> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:268
>          CGLSetCurrentContext(m_contextObj);

Maybe return false if CGLSetCurrentContext() doesn't return kCGLNoError?
Comment 6 WebKit Review Bot 2011-11-11 20:45:16 PST
Comment on attachment 114815 [details]
Patch for landing

Clearing flags on attachment: 114815

Committed r100068: <http://trac.webkit.org/changeset/100068>
Comment 7 WebKit Review Bot 2011-11-11 20:45:21 PST
All reviewed patches have been landed.  Closing bug.