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

Side by Side Diff: ppapi/tests/test_graphics_2d.h

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/tests/test_graphics_2d.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_TESTS_TEST_GRAPHICS_2D_H_ 5 #ifndef PPAPI_TESTS_TEST_GRAPHICS_2D_H_
6 #define PPAPI_TESTS_TEST_GRAPHICS_2D_H_ 6 #define PPAPI_TESTS_TEST_GRAPHICS_2D_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ppapi/c/pp_stdint.h" 10 #include "ppapi/c/pp_stdint.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const pp::Rect& square, uint32_t square_color) const; 59 const pp::Rect& square, uint32_t square_color) const;
60 60
61 // Validates that the given device context is a single color with a square of 61 // Validates that the given device context is a single color with a square of
62 // another color inside it. 62 // another color inside it.
63 bool IsSquareInDC(const pp::Graphics2D& dc, uint32_t background_color, 63 bool IsSquareInDC(const pp::Graphics2D& dc, uint32_t background_color,
64 const pp::Rect& square, uint32_t square_color) const; 64 const pp::Rect& square, uint32_t square_color) const;
65 65
66 // Validates that the given device context is filled with the given color. 66 // Validates that the given device context is filled with the given color.
67 bool IsDCUniformColor(const pp::Graphics2D& dc, uint32_t color) const; 67 bool IsDCUniformColor(const pp::Graphics2D& dc, uint32_t color) const;
68 68
69 // Returns true if Graphics2D resource is created correctly.
70 bool ResourceHealthCheck(pp::Instance* instance, pp::Graphics2D* context);
71 bool ResourceHealthCheckForC(pp::Instance* instance, PP_Resource graphics_2d);
72
69 // Issues a flush on the given device context and blocks until the flush 73 // Issues a flush on the given device context and blocks until the flush
70 // has issued its callback. Returns true on success. 74 // has issued its callback. Returns true on success.
71 bool FlushAndWaitForDone(pp::Graphics2D* context); 75 bool FlushAndWaitForDone(pp::Graphics2D* context);
72 76
73 // Creates an image and replaces the contents of the Graphics2D with the 77 // Creates an image and replaces the contents of the Graphics2D with the
74 // image, waiting for completion. This returns the resource ID of the image 78 // image, waiting for completion. This returns the resource ID of the image
75 // data we created. This image data will be released by the time the call 79 // data we created. This image data will be released by the time the call
76 // completes, but it can be used for comparisons later. 80 // completes, but it can be used for comparisons later.
77 // 81 //
78 // Returns 0 on failure. 82 // Returns 0 on failure.
(...skipping 29 matching lines...) Expand all
108 // and ui synchronous. 112 // and ui synchronous.
109 bool is_view_changed_; 113 bool is_view_changed_;
110 114
111 // Set to true to request that the next invocation of DidChangeView should 115 // Set to true to request that the next invocation of DidChangeView should
112 // post a quit to the message loop. DidChangeView will also reset the flag so 116 // post a quit to the message loop. DidChangeView will also reset the flag so
113 // this will only happen once. 117 // this will only happen once.
114 bool post_quit_on_view_changed_; 118 bool post_quit_on_view_changed_;
115 }; 119 };
116 120
117 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_ 121 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/tests/test_graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698