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

Side by Side Diff: cc/image_layer.h

Issue 12095053: cc: Avoid expensive RenderingStats collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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
« no previous file with comments | « cc/heads_up_display_layer.cc ('k') | cc/image_layer.cc » ('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 CC_IMAGE_LAYER_H_ 5 #ifndef CC_IMAGE_LAYER_H_
6 #define CC_IMAGE_LAYER_H_ 6 #define CC_IMAGE_LAYER_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/content_layer.h" 9 #include "cc/content_layer.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class ImageLayerUpdater; 14 class ImageLayerUpdater;
15 15
16 // A Layer that contains only an Image element. 16 // A Layer that contains only an Image element.
17 class CC_EXPORT ImageLayer : public TiledLayer { 17 class CC_EXPORT ImageLayer : public TiledLayer {
18 public: 18 public:
19 static scoped_refptr<ImageLayer> create(); 19 static scoped_refptr<ImageLayer> create();
20 20
21 virtual bool drawsContent() const OVERRIDE; 21 virtual bool drawsContent() const OVERRIDE;
22 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; 22 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
23 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE; 23 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats*) OVERRIDE;
24 virtual void calculateContentsScale( 24 virtual void calculateContentsScale(
25 float idealContentsScale, 25 float idealContentsScale,
26 float* contentsScaleX, 26 float* contentsScaleX,
27 float* contentsScaleY, 27 float* contentsScaleY,
28 gfx::Size* contentBounds) OVERRIDE; 28 gfx::Size* contentBounds) OVERRIDE;
29 29
30 void setBitmap(const SkBitmap& image); 30 void setBitmap(const SkBitmap& image);
31 31
32 private: 32 private:
33 ImageLayer(); 33 ImageLayer();
34 virtual ~ImageLayer(); 34 virtual ~ImageLayer();
35 35
36 void setTilingOption(TilingOption); 36 void setTilingOption(TilingOption);
37 37
38 virtual LayerUpdater* updater() const OVERRIDE; 38 virtual LayerUpdater* updater() const OVERRIDE;
39 virtual void createUpdaterIfNeeded() OVERRIDE; 39 virtual void createUpdaterIfNeeded() OVERRIDE;
40 float imageContentsScaleX() const; 40 float imageContentsScaleX() const;
41 float imageContentsScaleY() const; 41 float imageContentsScaleY() const;
42 42
43 SkBitmap m_bitmap; 43 SkBitmap m_bitmap;
44 44
45 scoped_refptr<ImageLayerUpdater> m_updater; 45 scoped_refptr<ImageLayerUpdater> m_updater;
46 }; 46 };
47 47
48 } // namespace cc 48 } // namespace cc
49 49
50 #endif // CC_IMAGE_LAYER_H_ 50 #endif // CC_IMAGE_LAYER_H_
OLDNEW
« no previous file with comments | « cc/heads_up_display_layer.cc ('k') | cc/image_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698