Implement android_webview url intercepting.
[chromium-blink-merge.git] / cc / image_layer.h
blob204db644c7cd02344b3e6d1c9d08531b89658be9
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"
11 namespace cc {
13 class ImageLayerTextureUpdater;
15 // A Layer that contains only an Image element.
16 class ImageLayerChromium : public TiledLayerChromium {
17 public:
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);
27 private:
28 ImageLayerChromium();
29 virtual ~ImageLayerChromium();
31 void setTilingOption(TilingOption);
33 virtual LayerTextureUpdater* textureUpdater() const OVERRIDE;
34 virtual void createTextureUpdaterIfNeeded() OVERRIDE;
35 virtual IntSize contentBounds() const OVERRIDE;
37 SkBitmap m_bitmap;
39 RefPtr<ImageLayerTextureUpdater> m_textureUpdater;
42 } // namespace cc
44 #endif