Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: content/renderer/browser_plugin/browser_plugin_compositing_helper.h

Issue 11967013: Fixes issues when switching between software and compositing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/browser_plugin_compositing_helper.h
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
index 5fd695d617ca6925c5d2ee4d422803141f62845b..6377531be08b2f78eada359f98411caeec6d038f 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
@@ -23,24 +23,37 @@ class WebLayer;
namespace content {
-class CONTENT_EXPORT BrowserPluginCompositingHelper {
+class BrowserPluginManager;
+
+class CONTENT_EXPORT BrowserPluginCompositingHelper :
+ public base::RefCounted<BrowserPluginCompositingHelper> {
public:
BrowserPluginCompositingHelper(WebKit::WebPluginContainer* container,
+ BrowserPluginManager* manager,
int host_routing_id);
- ~BrowserPluginCompositingHelper();
-
void EnableCompositing(bool);
+ void OnContainerDestroy();
void OnBuffersSwapped(const gfx::Size& size,
const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id);
void SetContainerSize(const gfx::Size&);
-
+ protected:
+ // Friend RefCounted so that the dtor can be non-public.
+ friend class base::RefCounted<BrowserPluginCompositingHelper>;
private:
+ ~BrowserPluginCompositingHelper();
+ void FreeMailboxMemory(const std::string& mailbox_name,
+ unsigned sync_point);
+ void MailboxReleased(const std::string& mailbox_name,
+ int gpu_route_id,
+ int gpu_host_id,
+ unsigned sync_point);
void UpdateUVRect();
int host_routing_id_;
bool last_mailbox_valid_;
+ bool ack_pending_;
gfx::Size buffer_size_;
gfx::Size container_size_;
@@ -48,6 +61,8 @@ class CONTENT_EXPORT BrowserPluginCompositingHelper {
scoped_refptr<cc::TextureLayer> texture_layer_;
scoped_ptr<WebKit::WebLayer> web_layer_;
WebKit::WebPluginContainer* container_;
+
+ scoped_refptr<BrowserPluginManager> browser_plugin_manager_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698