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

Side by Side Diff: cc/texture_layer.h

Issue 11189043: cc: Rename cc classes and members to match filenames (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TextureLayerChromium_h 5 #ifndef TextureLayerChromium_h
6 #define TextureLayerChromium_h 6 #define TextureLayerChromium_h
7 7
8 #include "cc/layer.h" 8 #include "cc/layer.h"
9 9
10 namespace WebKit { 10 namespace WebKit {
11 class WebGraphicsContext3D; 11 class WebGraphicsContext3D;
12 } 12 }
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class TextureLayerChromiumClient; 16 class TextureLayerClient;
17 17
18 // A Layer containing a the rendered output of a plugin instance. 18 // A Layer containing a the rendered output of a plugin instance.
19 class TextureLayerChromium : public LayerChromium { 19 class TextureLayer : public Layer {
20 public: 20 public:
21 // If this texture layer requires special preparation logic for each frame d riven by 21 // If this texture layer requires special preparation logic for each frame d riven by
22 // the compositor, pass in a non-nil client. Pass in a nil client pointer if texture updates 22 // the compositor, pass in a non-nil client. Pass in a nil client pointer if texture updates
23 // are driven by an external process. 23 // are driven by an external process.
24 static scoped_refptr<TextureLayerChromium> create(TextureLayerChromiumClient *); 24 static scoped_refptr<TextureLayer> create(TextureLayerClient*);
25 25
26 void clearClient() { m_client = 0; } 26 void clearClient() { m_client = 0; }
27 27
28 virtual scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE; 28 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE;
29 29
30 // Sets whether this texture should be Y-flipped at draw time. Defaults to t rue. 30 // Sets whether this texture should be Y-flipped at draw time. Defaults to t rue.
31 void setFlipped(bool); 31 void setFlipped(bool);
32 32
33 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). 33 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1).
34 void setUVRect(const FloatRect&); 34 void setUVRect(const FloatRect&);
35 35
36 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau lts to true. 36 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau lts to true.
37 void setPremultipliedAlpha(bool); 37 void setPremultipliedAlpha(bool);
38 38
39 // Sets whether this context should rate limit on damage to prevent too many frames from 39 // Sets whether this context should rate limit on damage to prevent too many frames from
40 // being queued up before the compositor gets a chance to run. Requires a no n-nil client. 40 // being queued up before the compositor gets a chance to run. Requires a no n-nil client.
41 // Defaults to false. 41 // Defaults to false.
42 void setRateLimitContext(bool); 42 void setRateLimitContext(bool);
43 43
44 // Code path for plugins which supply their own texture ID. 44 // Code path for plugins which supply their own texture ID.
45 void setTextureId(unsigned); 45 void setTextureId(unsigned);
46 46
47 void willModifyTexture(); 47 void willModifyTexture();
48 48
49 virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE; 49 virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
50 50
51 virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE; 51 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE;
52 virtual bool drawsContent() const OVERRIDE; 52 virtual bool drawsContent() const OVERRIDE;
53 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend eringStats&) OVERRIDE; 53 virtual void update(TextureUpdateQueue&, const OcclusionTracker*, RenderingS tats&) OVERRIDE;
54 virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE; 54 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
55 55
56 protected: 56 protected:
57 explicit TextureLayerChromium(TextureLayerChromiumClient*); 57 explicit TextureLayer(TextureLayerClient*);
58 virtual ~TextureLayerChromium(); 58 virtual ~TextureLayer();
59 59
60 private: 60 private:
61 TextureLayerChromiumClient* m_client; 61 TextureLayerClient* m_client;
62 62
63 bool m_flipped; 63 bool m_flipped;
64 FloatRect m_uvRect; 64 FloatRect m_uvRect;
65 bool m_premultipliedAlpha; 65 bool m_premultipliedAlpha;
66 bool m_rateLimitContext; 66 bool m_rateLimitContext;
67 bool m_contextLost; 67 bool m_contextLost;
68 68
69 unsigned m_textureId; 69 unsigned m_textureId;
70 }; 70 };
71 71
72 } 72 }
73 #endif 73 #endif
OLDNEW
« cc/active_animation.h ('K') | « 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