Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3208)

Unified Diff: cc/DecorationLayerChromium.h

Issue 10963056: [cc] Add window decoration layers (NinePatch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hacky rebase for Jerome to use Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCDecorationLayerImplTest.cpp ('k') | cc/DecorationLayerChromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/CCDecorationLayerImplTest.cpp ('k') | cc/DecorationLayerChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698