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

Side by Side Diff: cc/content_layer.h

Issue 11365025: Make cc a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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
« no previous file with comments | « cc/checkerboard_draw_quad.h ('k') | cc/content_layer_updater.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ContentLayerChromium_h 5 #ifndef ContentLayerChromium_h
6 #define ContentLayerChromium_h 6 #define ContentLayerChromium_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/cc_export.h"
9 #include "cc/layer_painter.h" 10 #include "cc/layer_painter.h"
10 #include "cc/tiled_layer.h" 11 #include "cc/tiled_layer.h"
11 12
12 class SkCanvas; 13 class SkCanvas;
13 14
14 namespace cc { 15 namespace cc {
15 16
16 class ContentLayerClient; 17 class ContentLayerClient;
17 class LayerUpdater; 18 class LayerUpdater;
18 19
19 class ContentLayerPainter : public LayerPainter { 20 class CC_EXPORT ContentLayerPainter : public LayerPainter {
20 public: 21 public:
21 static scoped_ptr<ContentLayerPainter> create(ContentLayerClient*); 22 static scoped_ptr<ContentLayerPainter> create(ContentLayerClient*);
22 23
23 virtual void paint(SkCanvas*, const gfx::Rect& contentRect, gfx::RectF& opaq ue) OVERRIDE; 24 virtual void paint(SkCanvas*, const gfx::Rect& contentRect, gfx::RectF& opaq ue) OVERRIDE;
24 25
25 private: 26 private:
26 explicit ContentLayerPainter(ContentLayerClient*); 27 explicit ContentLayerPainter(ContentLayerClient*);
27 28
28 ContentLayerClient* m_client; 29 ContentLayerClient* m_client;
29 30
30 DISALLOW_COPY_AND_ASSIGN(ContentLayerPainter); 31 DISALLOW_COPY_AND_ASSIGN(ContentLayerPainter);
31 }; 32 };
32 33
33 // A layer that renders its contents into an SkCanvas. 34 // A layer that renders its contents into an SkCanvas.
34 class ContentLayer : public TiledLayer { 35 class CC_EXPORT ContentLayer : public TiledLayer {
35 public: 36 public:
36 static scoped_refptr<ContentLayer> create(ContentLayerClient*); 37 static scoped_refptr<ContentLayer> create(ContentLayerClient*);
37 38
38 void clearClient() { m_client = 0; } 39 void clearClient() { m_client = 0; }
39 40
40 virtual bool drawsContent() const OVERRIDE; 41 virtual bool drawsContent() const OVERRIDE;
41 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; 42 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
42 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE; 43 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE;
43 virtual bool needMoreUpdates() OVERRIDE; 44 virtual bool needMoreUpdates() OVERRIDE;
44 45
45 virtual void setContentsOpaque(bool) OVERRIDE; 46 virtual void setContentsOpaque(bool) OVERRIDE;
46 47
47 protected: 48 protected:
48 explicit ContentLayer(ContentLayerClient*); 49 explicit ContentLayer(ContentLayerClient*);
49 virtual ~ContentLayer(); 50 virtual ~ContentLayer();
50 51
51 private: 52 private:
52 virtual LayerUpdater* updater() const OVERRIDE; 53 virtual LayerUpdater* updater() const OVERRIDE;
53 virtual void createUpdaterIfNeeded() OVERRIDE; 54 virtual void createUpdaterIfNeeded() OVERRIDE;
54 55
55 ContentLayerClient* m_client; 56 ContentLayerClient* m_client;
56 scoped_refptr<LayerUpdater> m_updater; 57 scoped_refptr<LayerUpdater> m_updater;
57 }; 58 };
58 59
59 } 60 }
60 #endif 61 #endif
OLDNEW
« no previous file with comments | « cc/checkerboard_draw_quad.h ('k') | cc/content_layer_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698