Correctly track texture cleared state for sharing
[chromium-blink-merge.git] / ui / display / chromeos / test / action_logger_util.h
blob4b66cd1fb10a01092062f71faffb041ddbe0138b
1 // Copyright 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.
5 #ifndef UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_
6 #define UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_
8 #include <string>
10 #include "ui/display/types/display_constants.h"
12 namespace gfx {
13 class Point;
14 class Size;
15 } // namespace gfx
17 namespace ui {
19 class DisplayMode;
20 class DisplaySnapshot;
22 namespace test {
24 // Strings returned by TestNativeDisplayDelegate::GetActionsAndClear() to
25 // describe various actions that were performed.
26 const char kInitXRandR[] = "init";
27 const char kGrab[] = "grab";
28 const char kUngrab[] = "ungrab";
29 const char kSync[] = "sync";
30 const char kForceDPMS[] = "dpms";
31 const char kTakeDisplayControl[] = "take";
32 const char kRelinquishDisplayControl[] = "relinquish";
34 // String returned by TestNativeDisplayDelegate::GetActionsAndClear() if no
35 // actions were requested.
36 const char kNoActions[] = "";
38 std::string DisplaySnapshotToString(const DisplaySnapshot& output);
40 // Returns a string describing a TestNativeDisplayDelegate::SetBackgroundColor()
41 // call.
42 std::string GetBackgroundAction(uint32_t color_argb);
44 // Returns a string describing a TestNativeDisplayDelegate::AddOutputMode()
45 // call.
46 std::string GetAddOutputModeAction(const DisplaySnapshot& output,
47 const DisplayMode* mode);
49 // Returns a string describing a TestNativeDisplayDelegate::Configure()
50 // call.
51 std::string GetCrtcAction(const DisplaySnapshot& output,
52 const DisplayMode* mode,
53 const gfx::Point& origin);
55 // Returns a string describing a TestNativeDisplayDelegate::CreateFramebuffer()
56 // call.
57 std::string GetFramebufferAction(const gfx::Size& size,
58 const DisplaySnapshot* out1,
59 const DisplaySnapshot* out2);
61 // Returns a string describing a TestNativeDisplayDelegate::SetHDCPState() call.
62 std::string GetSetHDCPStateAction(const DisplaySnapshot& output,
63 HDCPState state);
65 // Joins a sequence of strings describing actions (e.g. kScreenDim) such
66 // that they can be compared against a string returned by
67 // ActionLogger::GetActionsAndClear(). The list of actions must be
68 // terminated by a NULL pointer.
69 std::string JoinActions(const char* action, ...);
71 } // namespace test
72 } // namespace ui
74 #endif // UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_