diff options
author | crogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 01:29:33 +0000 |
---|---|---|
committer | crogers@google.com <crogers@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 01:29:33 +0000 |
commit | 601bb6cf913baa54fa337028b1233f8a1cc47158 (patch) | |
tree | 0ba2543805153b901e0a08c188d6c0b36b83ec51 /o3d | |
parent | 675e47130ddf0b5bd8ab6d450c403b8f8a700b77 (diff) | |
download | chromium_src-601bb6cf913baa54fa337028b1233f8a1cc47158.zip chromium_src-601bb6cf913baa54fa337028b1233f8a1cc47158.tar.gz chromium_src-601bb6cf913baa54fa337028b1233f8a1cc47158.tar.bz2 |
Review URL: http://codereview.chromium.org/119067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/plugin/mac/main_mac.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm index 4e94929..687f865 100644 --- a/o3d/plugin/mac/main_mac.mm +++ b/o3d/plugin/mac/main_mac.mm @@ -1063,10 +1063,23 @@ extern "C" { default_display.set_cgl_context(obj->mac_cgl_context_); obj->CreateRenderer(default_display); + + // if the renderer cannot be created (maybe the features are not supported) + // then we can proceed no further + if (!obj->renderer()) { + if (obj->mac_agl_context_) { + ::aglDestroyContext(obj->mac_agl_context_); + obj->mac_agl_context_ = NULL; + } + return NPERR_NO_ERROR; + } + obj->client()->Init(); obj->client()->SetRenderOnDemandCallback( new RenderOnDemandCallbackHandler(obj)); + + obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); obj->Resize(window->width, window->height); |