Index: cc/nine_patch_layer_impl.h |
diff --git a/cc/nine_patch_layer_impl.h b/cc/nine_patch_layer_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03e511c15208af383e0c994a569ba6e322111529 |
--- /dev/null |
+++ b/cc/nine_patch_layer_impl.h |
@@ -0,0 +1,49 @@ |
+// 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 NinePatchLayerImpl_h |
+#define NinePatchLayerImpl_h |
+ |
+#include "cc/layer_impl.h" |
+#include "cc/resource_provider.h" |
+#include <public/WebTransformationMatrix.h> |
jamesr
2012/11/01 19:55:43
looks like this include isn't needed
|
+ |
+namespace cc { |
+ |
+class NinePatchLayerImpl : public LayerImpl { |
+public: |
+ static scoped_ptr<NinePatchLayerImpl> create(int id) |
+ { |
+ return make_scoped_ptr(new NinePatchLayerImpl(id)); |
+ } |
+ virtual ~NinePatchLayerImpl(); |
+ |
+ virtual void willDraw(ResourceProvider*) OVERRIDE; |
+ virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
+ virtual void didDraw(ResourceProvider*) OVERRIDE; |
+ virtual ResourceProvider::ResourceId contentsResourceId() const OVERRIDE; |
+ virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; |
+ virtual void didLoseContext() OVERRIDE; |
+ void setResourceId(unsigned id) { m_resourceId = id; } |
jamesr
2012/11/01 19:55:43
nit: could you separate the LayerImpl overrides fr
|
+ void setNinePatchLayout(const IntSize& imageBounds, const IntRect& aperture); |
jamesr
2012/11/01 19:55:43
the "NinePatch" part here is somewhat redundant wi
|
+ |
+protected: |
+ explicit NinePatchLayerImpl(int id); |
+ |
+private: |
+ |
+ virtual const char* layerTypeAsString() const OVERRIDE; |
+ |
+ // The size of the NinePatch bitmap in pixels. |
+ IntSize m_imageBounds; |
+ |
+ // The transparent center region that shows the parent layer's contents in image space. |
+ IntRect m_imageAperture; |
+ |
+ ResourceProvider::ResourceId m_resourceId; |
+}; |
+ |
+} |
+ |
+#endif |