Index: cc/DecorationLayerChromium.h |
diff --git a/third_party/tcmalloc/vendor/src/base/spinlock_internal.h b/cc/DecorationLayerChromium.h |
similarity index 52% |
copy from third_party/tcmalloc/vendor/src/base/spinlock_internal.h |
copy to cc/DecorationLayerChromium.h |
index 44942609f40a87492a7aeed0068a5e27bf9cd157..ae7933a84e16236cd3226d910e3f1c455eb7ab86 100644 |
--- a/third_party/tcmalloc/vendor/src/base/spinlock_internal.h |
+++ b/cc/DecorationLayerChromium.h |
@@ -1,5 +1,5 @@ |
-/* Copyright (c) 2010, Google Inc. |
- * All rights reserved. |
+/* |
+ * Copyright (C) 2012 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -26,39 +26,52 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- * |
- * --- |
- * This file is an internal part spinlock.cc and once.cc |
- * It may not be used directly by code outside of //base. |
*/ |
-#ifndef BASE_SPINLOCK_INTERNAL_H_ |
-#define BASE_SPINLOCK_INTERNAL_H_ |
-#include <config.h> |
-#include "base/basictypes.h" |
-#include "base/atomicops.h" |
+#ifndef DecorationLayerChromium_h |
+#define DecorationLayerChromium_h |
+ |
+#if USE(ACCELERATED_COMPOSITING) |
danakj
2012/09/24 14:35:00
nit: drop the ACCELERATED_COMPOSITING in new files
|
+ |
+#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 PassRefPtr<DecorationLayerChromium> create(); |
+ virtual ~DecorationLayerChromium(); |
-namespace base { |
-namespace internal { |
+ 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; |
-// SpinLockWait() waits until it can perform one of several transitions from |
-// "from" to "to". It returns when it performs a transition where done==true. |
-struct SpinLockWaitTransition { |
- int32 from; |
- int32 to; |
- bool done; |
+ void setBitmap(const SkBitmap& bitmap, const IntRect& aperture); |
+ |
+private: |
+ DecorationLayerChromium(); |
+ PassOwnPtr<CCLayerImpl> createCCLayerImpl() OVERRIDE; |
+ |
+ virtual void createTextureUpdaterIfNeeded() OVERRIDE; |
+ |
+ RefPtr<DecorationLayerTextureUpdater> m_textureUpdater; |
+ OwnPtr<LayerTextureUpdater::Texture> m_texture; |
+ |
+ SkBitmap m_bitmap; |
+ |
+ // The transparent center region that shows the parent layer's contents in image space. |
+ IntRect m_imageAperture; |
}; |
-// Wait until *w can transition from trans[i].from to trans[i].to for some i |
-// satisfying 0<=i<n && trans[i].done, atomically make the transition, |
-// then return the old value of *w. Make any other atomic tranistions |
-// where !trans[i].done, but continue waiting. |
-int32 SpinLockWait(volatile Atomic32 *w, int n, |
- const SpinLockWaitTransition trans[]); |
-void SpinLockWake(volatile Atomic32 *w, bool all); |
-void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop); |
- |
-} // namespace internal |
-} // namespace base |
+} |
+#endif // USE(ACCELERATED_COMPOSITING) |
+ |
#endif |