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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 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 #include <map>
6
7 #include "base/synchronization/lock.h"
8 #include "cc/resources/shared_bitmap_manager.h"
9
10 namespace cc {
11
12 class TestSharedBitmapManager : public SharedBitmapManager {
13 public:
14 TestSharedBitmapManager();
15 virtual ~TestSharedBitmapManager();
16
17 virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size)
18 OVERRIDE;
19
20 virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId(
21 const gfx::Size&,
22 const SharedBitmapId& id) OVERRIDE;
23
24 virtual scoped_ptr<SharedBitmap> GetBitmapForSharedMemory(
25 base::SharedMemory* memory) OVERRIDE;
26
27 private:
28 base::Lock lock_;
29 std::map<SharedBitmapId, base::SharedMemory*> bitmap_map_;
30 };
31
32 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698