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

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

Issue 11824040: Enables compositing support for webview. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed build error on mac and win, nits 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
new file mode 100644
index 0000000000000000000000000000000000000000..e624fe9525f9d7891a519728f62d41e03552b5e2
--- /dev/null
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_
+#define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "ui/gfx/size.h"
+
+namespace cc {
+class TextureLayer;
+}
+
+namespace WebKit {
+class WebPluginContainer;
+class WebLayer;
+}
+
+namespace content {
+
+class CONTENT_EXPORT BrowserPluginCompositingHelper {
+ public:
+ BrowserPluginCompositingHelper(WebKit::WebPluginContainer* container,
+ int host_routing_id);
+ ~BrowserPluginCompositingHelper();
+
+ void EnableCompositing(bool);
+ void OnBuffersSwapped(const gfx::Size& size,
+ const std::string& mailbox_name,
+ int gpu_route_id,
+ int gpu_host_id);
+
+ private:
+ int host_routing_id_;
+ bool last_mailbox_valid_;
+
+ scoped_refptr<cc::TextureLayer> texture_layer_;
+ scoped_ptr<WebKit::WebLayer> web_layer_;
+ WebKit::WebPluginContainer* container_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698