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
3 // found in the LICENSE file.
5 #ifndef ImageLayerChromium_h
6 #define ImageLayerChromium_h
8 #include "ContentLayerChromium.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
13 class ImageLayerTextureUpdater
;
15 // A Layer that contains only an Image element.
16 class ImageLayerChromium
: public TiledLayerChromium
{
18 static scoped_refptr
<ImageLayerChromium
> create();
20 virtual bool drawsContent() const OVERRIDE
;
21 virtual void setTexturePriorities(const CCPriorityCalculator
&) OVERRIDE
;
22 virtual void update(CCTextureUpdateQueue
&, const CCOcclusionTracker
*, CCRenderingStats
&) OVERRIDE
;
23 virtual bool needsContentsScale() const OVERRIDE
;
25 void setBitmap(const SkBitmap
& image
);
29 virtual ~ImageLayerChromium();
31 void setTilingOption(TilingOption
);
33 virtual LayerTextureUpdater
* textureUpdater() const OVERRIDE
;
34 virtual void createTextureUpdaterIfNeeded() OVERRIDE
;
35 virtual IntSize
contentBounds() const OVERRIDE
;
39 RefPtr
<ImageLayerTextureUpdater
> m_textureUpdater
;