| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 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 | 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 // Temporary forwarding header |
| 6 #ifndef ImageLayerChromium_h | 6 #include "cc/image_layer.h" |
| 7 #define ImageLayerChromium_h | |
| 8 | |
| 9 #if USE(ACCELERATED_COMPOSITING) | |
| 10 | |
| 11 #include "ContentLayerChromium.h" | |
| 12 #include "SkBitmap.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 | |
| 16 class ImageLayerTextureUpdater; | |
| 17 | |
| 18 // A Layer that contains only an Image element. | |
| 19 class ImageLayerChromium : public TiledLayerChromium { | |
| 20 public: | |
| 21 static scoped_refptr<ImageLayerChromium> create(); | |
| 22 | |
| 23 virtual bool drawsContent() const OVERRIDE; | |
| 24 virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE; | |
| 25 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend
eringStats&) OVERRIDE; | |
| 26 virtual bool needsContentsScale() const OVERRIDE; | |
| 27 | |
| 28 void setBitmap(const SkBitmap& image); | |
| 29 | |
| 30 private: | |
| 31 ImageLayerChromium(); | |
| 32 virtual ~ImageLayerChromium(); | |
| 33 | |
| 34 void setTilingOption(TilingOption); | |
| 35 | |
| 36 virtual LayerTextureUpdater* textureUpdater() const OVERRIDE; | |
| 37 virtual void createTextureUpdaterIfNeeded() OVERRIDE; | |
| 38 virtual IntSize contentBounds() const OVERRIDE; | |
| 39 | |
| 40 SkBitmap m_bitmap; | |
| 41 | |
| 42 RefPtr<ImageLayerTextureUpdater> m_textureUpdater; | |
| 43 }; | |
| 44 | |
| 45 } | |
| 46 #endif // USE(ACCELERATED_COMPOSITING) | |
| 47 | |
| 48 #endif | |
| OLD | NEW |