summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_host.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 00:38:11 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 00:38:11 +0000
commitc20b454f6a44ff119c0683a8228b292ba88d6044 (patch)
treefa3e0721d2c084d14eb067cdc4b7c7a8bdc7ae17 /webkit/glue/plugins/plugin_host.h
parent3deb65daf866945e0a5e211897e0d5382f3c272b (diff)
downloadchromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.zip
chromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.tar.gz
chromium_src-c20b454f6a44ff119c0683a8228b292ba88d6044.tar.bz2
Fix painting problem with transparent plugins because plugins were ignoring the alpha channel sometimes.
This change introduces another buffer which holds the background image for transparent plugins. Before painting these plugins, their backing store is overwritten with the background data. This change also uses an ACK from the renderer to figure out when it can paint, similar to how the renderer does it, which gives us throttling and also doesn't lead to painting when the tab is hidden. Review URL: http://codereview.chromium.org/5040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_host.h')
-rw-r--r--webkit/glue/plugins/plugin_host.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/webkit/glue/plugins/plugin_host.h b/webkit/glue/plugins/plugin_host.h
index 0a90f29..be12d5e 100644
--- a/webkit/glue/plugins/plugin_host.h
+++ b/webkit/glue/plugins/plugin_host.h
@@ -9,11 +9,8 @@
#include <string>
#include <vector>
-#include <map>
#include "base/ref_counted.h"
-#include "base/gfx/rect.h"
-#include "base/task.h"
#include "webkit/glue/plugins/nphostapi.h"
#include "third_party/npapi/bindings/npapi.h"
@@ -50,31 +47,12 @@ class PluginHost : public base::RefCounted<PluginHost> {
void PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides);
- // Handles invalidateRect requests for windowless plugins.
- void InvalidateRect(NPP id, NPRect* invalidRect);
-
private:
PluginHost();
void InitializeHostFuncs();
- // For certain plugins like flash we need to throttle invalidateRect
- // requests as they are made at a high frequency.
- void OnInvalidateRect(NPP id, PluginInstance* instance);
-
static scoped_refptr<PluginHost> singleton_;
NPNetscapeFuncs host_funcs_;
DISALLOW_EVIL_CONSTRUCTORS(PluginHost);
-
- // This structure keeps track of individual plugin instance invalidates.
- struct ThrottledInvalidates {
- std::vector<gfx::Rect> throttled_invalidates;
- };
-
- // We need to track throttled invalidate rects on a per plugin instance
- // basis.
- typedef std::map<NPP, ThrottledInvalidates> InstanceThrottledInvalidatesMap;
- InstanceThrottledInvalidatesMap instance_throttled_invalidates_;
-
- ScopedRunnableMethodFactory<PluginHost> throttle_factory_;
};
} // namespace NPAPI