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

Unified Diff: cc/texture_layer.h

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « cc/texture_draw_quad.cc ('k') | cc/texture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer.h
diff --git a/cc/texture_layer.h b/cc/texture_layer.h
index 638cbb270ce9b24689d5095baf174ade4f4d1a13..124f84505d27b6111a21ea748ebe559a436f98e0 100644
--- a/cc/texture_layer.h
+++ b/cc/texture_layer.h
@@ -1,3 +1,77 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
+// Copyright 2010 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 TextureLayerChromium_h
+#define TextureLayerChromium_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "LayerChromium.h"
+
+namespace WebKit {
+class WebGraphicsContext3D;
+}
+
+namespace cc {
+
+class TextureLayerChromiumClient;
+
+// A Layer containing a the rendered output of a plugin instance.
+class TextureLayerChromium : public LayerChromium {
+public:
+ // If this texture layer requires special preparation logic for each frame driven by
+ // the compositor, pass in a non-nil client. Pass in a nil client pointer if texture updates
+ // are driven by an external process.
+ static scoped_refptr<TextureLayerChromium> create(TextureLayerChromiumClient*);
+
+ void clearClient() { m_client = 0; }
+
+ virtual scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
+
+ // Sets whether this texture should be Y-flipped at draw time. Defaults to true.
+ void setFlipped(bool);
+
+ // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1).
+ void setUVRect(const FloatRect&);
+
+ // Sets whether the alpha channel is premultiplied or unpremultiplied. Defaults to true.
+ void setPremultipliedAlpha(bool);
+
+ // Sets whether this context should rate limit on damage to prevent too many frames from
+ // being queued up before the compositor gets a chance to run. Requires a non-nil client.
+ // Defaults to false.
+ void setRateLimitContext(bool);
+
+ // Code path for plugins which supply their own texture ID.
+ void setTextureId(unsigned);
+
+ void willModifyTexture();
+
+ virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
+
+ virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE;
+ virtual bool drawsContent() const OVERRIDE;
+ virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRenderingStats&) OVERRIDE;
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
+
+protected:
+ explicit TextureLayerChromium(TextureLayerChromiumClient*);
+ virtual ~TextureLayerChromium();
+
+private:
+ TextureLayerChromiumClient* m_client;
+
+ bool m_flipped;
+ FloatRect m_uvRect;
+ bool m_premultipliedAlpha;
+ bool m_rateLimitContext;
+ bool m_contextLost;
+
+ unsigned m_textureId;
+};
+
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif
« no previous file with comments | « cc/texture_draw_quad.cc ('k') | cc/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698