diff options
author | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 16:44:55 +0000 |
---|---|---|
committer | neb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 16:44:55 +0000 |
commit | 33e9215cf129c9ede3bc373119bda7c3093262aa (patch) | |
tree | efc3a47de22298d604c5bfa97fcf65cdbcaf4c81 /chrome/renderer | |
parent | c6ac841f51c0b884b38e917ac30b1dfde0dc43a7 (diff) | |
download | chromium_src-33e9215cf129c9ede3bc373119bda7c3093262aa.zip chromium_src-33e9215cf129c9ede3bc373119bda7c3093262aa.tar.gz chromium_src-33e9215cf129c9ede3bc373119bda7c3093262aa.tar.bz2 |
Fix building with enable_gpu=0
BUG=crbug.com/51459
TEST=passed compilation
Review URL: http://codereview.chromium.org/3168008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/ggl/ggl.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_pepper.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_pepper.h | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc index 834a1ae..18e400b3 100644 --- a/chrome/renderer/ggl/ggl.cc +++ b/chrome/renderer/ggl/ggl.cc @@ -350,7 +350,9 @@ uint32 GetParentTextureId(Context* context) { void SetSwapBuffersCallback(Context* context, Callback1<Context*>::Type* callback) { +#if defined(ENABLE_GPU) context->SetSwapBuffersCallback(callback); +#endif } bool MakeCurrent(Context* context) { diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index e085750..3536833 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -66,7 +66,10 @@ #include "webkit/glue/plugins/plugin_constants_win.h" #endif +#if defined(ENABLE_GPU) using gpu::Buffer; +#endif + using webkit_glue::WebPlugin; using webkit_glue::WebPluginDelegate; using webkit_glue::WebPluginResourceClient; @@ -84,7 +87,9 @@ struct Device2DImpl { }; struct Device3DImpl { +#if defined(ENABLE_GPU) gpu::CommandBuffer* command_buffer; +#endif bool dynamically_created; }; @@ -1386,9 +1391,9 @@ WebPluginDelegatePepper::WebPluginDelegatePepper( #endif // (OS_LINUX) #if defined(ENABLE_GPU) command_buffer_(NULL), + method_factory3d_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), #endif find_identifier_(-1), - method_factory3d_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), current_choose_file_callback_(NULL), current_choose_file_user_data_(NULL) { // For now we keep a window struct, although it isn't used. diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h index bc6be53..2535071 100644 --- a/chrome/renderer/webplugin_delegate_pepper.h +++ b/chrome/renderer/webplugin_delegate_pepper.h @@ -324,14 +324,14 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate, #if defined(ENABLE_GPU) // The command buffer used to issue commands to the nested GPU plugin. CommandBufferProxy* command_buffer_; + + // Runnable methods that must be cancelled when the 3D context is destroyed. + ScopedRunnableMethodFactory<WebPluginDelegatePepper> method_factory3d_; #endif // The id of the current find operation, or -1 if none is in process. int find_identifier_; - // Runnable methods that must be cancelled when the 3D context is destroyed. - ScopedRunnableMethodFactory<WebPluginDelegatePepper> method_factory3d_; - // When a choose file operation is outstanding, this will contain a // pointer to the callback specified by the plugin. Will be NULL otherwise. NPChooseFileCallback current_choose_file_callback_; |