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

Side by Side Diff: cc/skpicture_canvas_layer_texture_updater.h

Issue 11144023: cc: Store tiles, painters, tiling data in scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « cc/scrollbar_layer.cc ('k') | cc/skpicture_canvas_layer_texture_updater.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 5
6 #ifndef SkPictureCanvasLayerTextureUpdater_h 6 #ifndef SkPictureCanvasLayerTextureUpdater_h
7 #define SkPictureCanvasLayerTextureUpdater_h 7 #define SkPictureCanvasLayerTextureUpdater_h
8 8
9 #include "CanvasLayerTextureUpdater.h" 9 #include "CanvasLayerTextureUpdater.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
11 11
12 class SkCanvas; 12 class SkCanvas;
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class LayerPainterChromium; 16 class LayerPainterChromium;
17 17
18 // This class records the contentRect into an SkPicture. Subclasses, provide 18 // This class records the contentRect into an SkPicture. Subclasses, provide
19 // different implementations of tile updating based on this recorded picture. 19 // different implementations of tile updating based on this recorded picture.
20 // The BitmapSkPictureCanvasLayerTextureUpdater and 20 // The BitmapSkPictureCanvasLayerTextureUpdater and
21 // FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such 21 // FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such
22 // implementations. 22 // implementations.
23 class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater { 23 class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater {
24 public: 24 public:
25 virtual ~SkPictureCanvasLayerTextureUpdater(); 25 virtual ~SkPictureCanvasLayerTextureUpdater();
26 26
27 virtual void setOpaque(bool) OVERRIDE; 27 virtual void setOpaque(bool) OVERRIDE;
28 28
29 protected: 29 protected:
30 explicit SkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium> ); 30 explicit SkPictureCanvasLayerTextureUpdater(scoped_ptr<LayerPainterChromium> );
31 31
32 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) OVERRIDE; 32 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) OVERRIDE;
33 void drawPicture(SkCanvas*); 33 void drawPicture(SkCanvas*);
34 void updateTexture(CCTextureUpdateQueue& queue, CCPrioritizedTexture* textur e, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate); 34 void updateTexture(CCTextureUpdateQueue& queue, CCPrioritizedTexture* textur e, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate);
35 35
36 bool layerIsOpaque() const { return m_layerIsOpaque; } 36 bool layerIsOpaque() const { return m_layerIsOpaque; }
37 37
38 private: 38 private:
39 // Recording canvas. 39 // Recording canvas.
40 SkPicture m_picture; 40 SkPicture m_picture;
41 // True when it is known that all output pixels will be opaque. 41 // True when it is known that all output pixels will be opaque.
42 bool m_layerIsOpaque; 42 bool m_layerIsOpaque;
43 }; 43 };
44 44
45 } // namespace cc 45 } // namespace cc
46 #endif // SkPictureCanvasLayerTextureUpdater_h 46 #endif // SkPictureCanvasLayerTextureUpdater_h
OLDNEW
« no previous file with comments | « cc/scrollbar_layer.cc ('k') | cc/skpicture_canvas_layer_texture_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698