OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DecorationLayerChromium_h |
| 6 #define DecorationLayerChromium_h |
| 7 |
| 8 #include "LayerChromium.h" |
| 9 #include "LayerTextureUpdater.h" |
| 10 #include "SkBitmap.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 class DecorationLayerTextureUpdater; |
| 15 |
| 16 // A Layer that contains sparse quads being sourced from bitmaps. |
| 17 class DecorationLayerChromium : public LayerChromium { |
| 18 public: |
| 19 static scoped_refptr<DecorationLayerChromium> create(); |
| 20 virtual ~DecorationLayerChromium(); |
| 21 |
| 22 virtual bool drawsContent() const OVERRIDE; |
| 23 virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE; |
| 24 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend
eringStats&) OVERRIDE; |
| 25 virtual bool needsContentsScale() const OVERRIDE; |
| 26 virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE; |
| 27 |
| 28 void setBitmap(const SkBitmap& bitmap, const IntRect& aperture); |
| 29 |
| 30 private: |
| 31 DecorationLayerChromium(); |
| 32 scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE; |
| 33 |
| 34 virtual void createTextureUpdaterIfNeeded() OVERRIDE; |
| 35 |
| 36 RefPtr<DecorationLayerTextureUpdater> m_textureUpdater; |
| 37 OwnPtr<LayerTextureUpdater::Texture> m_texture; |
| 38 |
| 39 SkBitmap m_bitmap; |
| 40 bool m_bitmapDirty; |
| 41 |
| 42 // The transparent center region that shows the parent layer's contents in i
mage space. |
| 43 IntRect m_imageAperture; |
| 44 }; |
| 45 |
| 46 } |
| 47 |
| 48 #endif |
OLD | NEW |