diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-17 06:13:42 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-17 06:13:42 +0000 |
commit | 3d476cf047d6a463d5706f70bfdf5e3787f863ee (patch) | |
tree | a14f7c154461bcd0f130998e208f4797ff97727c /o3d/plugin/mac | |
parent | 16782af93aa5c1fe71bdf90b1d256c410d53bd2a (diff) | |
download | chromium_src-3d476cf047d6a463d5706f70bfdf5e3787f863ee.zip chromium_src-3d476cf047d6a463d5706f70bfdf5e3787f863ee.tar.gz chromium_src-3d476cf047d6a463d5706f70bfdf5e3787f863ee.tar.bz2 |
Undoing gcl bug damage
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/mac')
-rw-r--r-- | o3d/plugin/mac/main_mac.mm | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm index c9dcec0..17f1039 100644 --- a/o3d/plugin/mac/main_mac.mm +++ b/o3d/plugin/mac/main_mac.mm @@ -903,7 +903,7 @@ extern "C" { if (obj->drawing_model_ == NPDrawingModelOpenGL) { CGLSetCurrentContext(obj->mac_cgl_context_); - } else if (!had_a_window && obj->mac_agl_context_ == NULL) { // setup AGL context + } else if (obj->mac_agl_context_ == NULL) { // setup AGL context AGLPixelFormat myAGLPixelFormat = NULL; // We need to spec out a few similar but different sets of renderer @@ -1075,10 +1075,8 @@ extern "C" { // Renderer is already initialized from a previous call to this function, // just update size and position and return. if (had_a_window) { - if (obj->renderer()) { - obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); - obj->Resize(window->width, window->height); - } + obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); + obj->Resize(window->width, window->height); return NPERR_NO_ERROR; } @@ -1096,22 +1094,22 @@ extern "C" { ::aglDestroyContext(obj->mac_agl_context_); obj->mac_agl_context_ = NULL; } + return NPERR_NO_ERROR; } obj->client()->Init(); obj->client()->SetRenderOnDemandCallback( new RenderOnDemandCallbackHandler(obj)); - if (obj->renderer()) { - obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); - obj->Resize(window->width, window->height); + obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); + obj->Resize(window->width, window->height); + #ifdef CFTIMER - // now that the grahics context is setup, add this instance to the timer - // list so it gets drawn repeatedly - gRenderTimer.AddInstance(instance); + // now that the grahics context is setup, add this instance to the timer + // list so it gets drawn repeatedly + gRenderTimer.AddInstance(instance); #endif // CFTIMER - } return NPERR_NO_ERROR; } |