| Index: cc/DecorationLayerChromium.h
|
| diff --git a/cc/DecorationLayerChromium.h b/cc/DecorationLayerChromium.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0831a1170f7b89e9edd49aa2a4187bf4bd4b2de3
|
| --- /dev/null
|
| +++ b/cc/DecorationLayerChromium.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef DecorationLayerChromium_h
|
| +#define DecorationLayerChromium_h
|
| +
|
| +#include "LayerChromium.h"
|
| +#include "LayerTextureUpdater.h"
|
| +#include "SkBitmap.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class DecorationLayerTextureUpdater;
|
| +
|
| +// A Layer that contains sparse quads being sourced from bitmaps.
|
| +class DecorationLayerChromium : public LayerChromium {
|
| +public:
|
| + static scoped_refptr<DecorationLayerChromium> create();
|
| + virtual ~DecorationLayerChromium();
|
| +
|
| + virtual bool drawsContent() const OVERRIDE;
|
| + virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE;
|
| + virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRenderingStats&) OVERRIDE;
|
| + virtual bool needsContentsScale() const OVERRIDE;
|
| + virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
|
| +
|
| + void setBitmap(const SkBitmap& bitmap, const IntRect& aperture);
|
| +
|
| +private:
|
| + DecorationLayerChromium();
|
| + scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
|
| +
|
| + virtual void createTextureUpdaterIfNeeded() OVERRIDE;
|
| +
|
| + RefPtr<DecorationLayerTextureUpdater> m_textureUpdater;
|
| + OwnPtr<LayerTextureUpdater::Texture> m_texture;
|
| +
|
| + SkBitmap m_bitmap;
|
| + bool m_bitmapDirty;
|
| +
|
| + // The transparent center region that shows the parent layer's contents in image space.
|
| + IntRect m_imageAperture;
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif
|
|
|