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

Side by Side Diff: blimp/client/test/compositor/test_display_compositor.h

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fixed this a bit more. Still some thread violations :(. Created 4 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef BLIMP_CLIENT_TEST_COMPOSITOR_TEST_DISPLAY_COMPOSITOR_H_
6 #define BLIMP_CLIENT_TEST_COMPOSITOR_TEST_DISPLAY_COMPOSITOR_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "blimp/client/support/compositor/display_compositor.h"
11
12 class SkBitmap;
13
14 namespace cc {
15 class CopyOutputResult;
16 } // namespace cc
17
18 namespace blimp {
19 namespace client {
20 class CompositorDependencies;
21
22 // An implementation of the DisplayCompositor that supplies a ContextProvider
23 // that is not backed by a platform specific widget. It is not meant to be used
24 // to actually display content. It also provides a hook to get access to an
25 // SkBitmap that represents the cc::Layer passed into |SetContentLayer|.
26 class TestDisplayCompositor : public DisplayCompositor {
27 public:
28 struct CopyRequest {
29 CopyRequest();
30 ~CopyRequest();
31
32 base::WaitableEvent waiter;
33 std::unique_ptr<SkBitmap> result;
34 };
35
36 explicit TestDisplayCompositor(
37 CompositorDependencies* compositor_dependencies);
38 ~TestDisplayCompositor() override;
39
40 // Returns an SkBitmap that represents the cc::Layer hierarchy being drawn by
41 // this compositor. This will block until the readback completes.
42 void GetBitmap(CopyRequest* request);
Khushal 2016/09/13 04:47:24 I know you really wanted a sync call but I would s
David Trainor- moved to gerrit 2016/09/13 06:18:05 This is all gone. Moved to BlimpContentsView like
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(TestDisplayCompositor);
46 };
47
48 } // namespace client
49 } // namespace blimp
50
51 #endif // BLIMP_CLIENT_TEST_COMPOSITOR_TEST_DISPLAY_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698