| OLD | NEW |
| 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 CanvasLayerTextureUpdater_h | 6 #ifndef CanvasLayerTextureUpdater_h |
| 7 #define CanvasLayerTextureUpdater_h | 7 #define CanvasLayerTextureUpdater_h |
| 8 | 8 |
| 9 #include "LayerTextureUpdater.h" | 9 #include "LayerTextureUpdater.h" |
| 10 | 10 |
| 11 class SkCanvas; | 11 class SkCanvas; |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 | 14 |
| 15 class LayerPainterChromium; | 15 class LayerPainterChromium; |
| 16 | 16 |
| 17 // Base class for BitmapCanvasLayerTextureUpdater and | 17 // Base class for BitmapCanvasLayerTextureUpdater and |
| 18 // SkPictureCanvasLayerTextureUpdater that reduces code duplication between | 18 // SkPictureCanvasLayerTextureUpdater that reduces code duplication between |
| 19 // their respective paintContents implementations. | 19 // their respective paintContents implementations. |
| 20 class CanvasLayerTextureUpdater : public LayerTextureUpdater { | 20 class CanvasLayerTextureUpdater : public LayerTextureUpdater { |
| 21 public: | 21 public: |
| 22 virtual ~CanvasLayerTextureUpdater(); | 22 virtual ~CanvasLayerTextureUpdater(); |
| 23 | 23 |
| 24 protected: | 24 protected: |
| 25 explicit CanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium>); | 25 explicit CanvasLayerTextureUpdater(scoped_ptr<LayerPainterChromium>); |
| 26 | 26 |
| 27 void paintContents(SkCanvas*, const IntRect& contentRect, float contentsWidt
hScale, float contentsHeightScale, IntRect& resultingOpaqueRect, CCRenderingStat
s&); | 27 void paintContents(SkCanvas*, const IntRect& contentRect, float contentsWidt
hScale, float contentsHeightScale, IntRect& resultingOpaqueRect, CCRenderingStat
s&); |
| 28 const IntRect& contentRect() const { return m_contentRect; } | 28 const IntRect& contentRect() const { return m_contentRect; } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 IntRect m_contentRect; | 31 IntRect m_contentRect; |
| 32 OwnPtr<LayerPainterChromium> m_painter; | 32 scoped_ptr<LayerPainterChromium> m_painter; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace cc | 35 } // namespace cc |
| 36 #endif // CanvasLayerTextureUpdater_h | 36 |
| 37 #endif // CanvasLayerTextureUpdater_h |
| OLD | NEW |