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

Unified Diff: cc/test/test_shared_bitmap_manager.h

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: cc/test/test_shared_bitmap_manager.h
diff --git a/cc/test/test_shared_bitmap_manager.h b/cc/test/test_shared_bitmap_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..ab047ef1ec3fd502dc2f749b61b38781982b0719
--- /dev/null
+++ b/cc/test/test_shared_bitmap_manager.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2014 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.
+
+#include <map>
+
+#include "base/synchronization/lock.h"
+#include "cc/resources/shared_bitmap_manager.h"
+
+namespace cc {
+
+class TestSharedBitmapManager : public SharedBitmapManager {
+ public:
+ TestSharedBitmapManager();
+ virtual ~TestSharedBitmapManager();
+
+ virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size)
+ OVERRIDE;
+
+ virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
+ const gfx::Size&,
+ const SharedBitmapId& id) OVERRIDE;
+
+ virtual scoped_ptr<SharedBitmap> GetBitmapForSharedMemory(
+ base::SharedMemory* memory) OVERRIDE;
+
+ private:
+ base::Lock lock_;
+ std::map<SharedBitmapId, base::SharedMemory*> bitmap_map_;
+};
+
+} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698