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

Unified Diff: ui/gfx/compositor/compositor_cc.h

Issue 8307001: Enable accelerated compositing of web pages when using webkit compositor (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 years, 2 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
« no previous file with comments | « ui/gfx/compositor/compositor.h ('k') | ui/gfx/compositor/compositor_cc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_cc.h
diff --git a/ui/gfx/compositor/compositor_cc.h b/ui/gfx/compositor/compositor_cc.h
index 72ea1367f3c411d443fe6899d5f9bce2abb8334c..a4e9f69578d3064802918e121a86304d154cf088 100644
--- a/ui/gfx/compositor/compositor_cc.h
+++ b/ui/gfx/compositor/compositor_cc.h
@@ -7,6 +7,8 @@
#pragma once
#include "base/compiler_specific.h"
+#include "base/memory/singleton.h"
+#include "base/memory/ref_counted.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/size.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebLayer.h"
@@ -16,10 +18,37 @@
namespace gfx {
class Rect;
+class GLContext;
+class GLSurface;
+class GLShareGroup;
}
namespace ui {
+class COMPOSITOR_EXPORT SharedResourcesCC : public SharedResources {
+ public:
+ static SharedResourcesCC* GetInstance();
+
+ virtual bool MakeSharedContextCurrent();
+ gfx::GLShareGroup* GetShareGroup();
+
+ private:
+ friend struct DefaultSingletonTraits<SharedResourcesCC>;
+
+ SharedResourcesCC();
+ virtual ~SharedResourcesCC();
+
+ bool Initialize();
+ void Destroy();
+
+ bool initialized_;
+
+ scoped_refptr<gfx::GLContext> context_;
+ scoped_refptr<gfx::GLSurface> surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedResourcesCC);
+};
+
class COMPOSITOR_EXPORT TextureCC : public Texture {
public:
TextureCC();
@@ -32,7 +61,13 @@ class COMPOSITOR_EXPORT TextureCC : public Texture {
virtual void Draw(const ui::TextureDrawParams& params,
const gfx::Rect& clip_bounds_in_texture) OVERRIDE;
- private:
+ virtual void Update() = 0;
+ unsigned int texture_id() const { return texture_id_; }
+ bool flipped() const { return flipped_; }
+
+ protected:
+ unsigned int texture_id_;
+ bool flipped_;
DISALLOW_COPY_AND_ASSIGN(TextureCC);
};
« no previous file with comments | « ui/gfx/compositor/compositor.h ('k') | ui/gfx/compositor/compositor_cc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698