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 CCDecorationLayerImpl_h |
| 6 #define CCDecorationLayerImpl_h |
| 7 |
| 8 #include "CCLayerImpl.h" |
| 9 #include <public/WebTransformationMatrix.h> |
| 10 |
| 11 namespace cc { |
| 12 |
| 13 class CCDecorationLayerImpl : public CCLayerImpl { |
| 14 public: |
| 15 static scoped_ptr<CCDecorationLayerImpl> create(int id) |
| 16 { |
| 17 return make_scoped_ptr(new CCDecorationLayerImpl(id)); |
| 18 } |
| 19 virtual ~CCDecorationLayerImpl(); |
| 20 |
| 21 virtual void willDraw(CCResourceProvider*) OVERRIDE; |
| 22 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) OVERRIDE; |
| 23 virtual void didDraw(CCResourceProvider*) OVERRIDE; |
| 24 virtual CCResourceProvider::ResourceId contentsResourceId() const OVERRIDE; |
| 25 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; |
| 26 virtual void didLoseContext() OVERRIDE; |
| 27 void setResourceId(unsigned id) { m_resourceId = id; } |
| 28 void setDecorationLayout(const IntSize& imageBounds, const IntRect& aperture
); |
| 29 |
| 30 protected: |
| 31 explicit CCDecorationLayerImpl(int id); |
| 32 |
| 33 private: |
| 34 |
| 35 virtual const char* layerTypeAsString() const OVERRIDE { return "DecorationL
ayer"; } |
| 36 |
| 37 // The size of the decoration bitmap in pixels. |
| 38 IntSize m_imageBounds; |
| 39 |
| 40 // The transparent center region that shows the parent layer's contents in i
mage space. |
| 41 IntRect m_imageAperture; |
| 42 |
| 43 CCResourceProvider::ResourceId m_resourceId; |
| 44 }; |
| 45 |
| 46 } |
| 47 |
| 48 #endif // CCDecorationLayerImpl_h |
OLD | NEW |