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

Unified Diff: ppapi/tests/test_graphics_2d.h

Issue 10823378: Cache image data objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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: ppapi/tests/test_graphics_2d.h
diff --git a/ppapi/tests/test_graphics_2d.h b/ppapi/tests/test_graphics_2d.h
index b5165e246be9ba391adbbc2f966256070ec33604..3c1fe3288993ed394cb6aa6b3a1b3a8033b83fa9 100644
--- a/ppapi/tests/test_graphics_2d.h
+++ b/ppapi/tests/test_graphics_2d.h
@@ -69,6 +69,15 @@ class TestGraphics2D : public TestCase {
// has issued its callback. Returns true on success.
bool FlushAndWaitForDone(pp::Graphics2D* context);
+ // Creates an image and replaces the contents of the Graphics2D with the
+ // image, waiting for completion. This returns the resource ID of the image
+ // data we created. This image data will be released by the time the call
+ // completes, but it can be used for comparisons later.
+ //
+ // Returns 0 on failure.
+ PP_Resource ReplaceContentsAndReturnID(pp::Graphics2D* dc,
+ const pp::Size& size);
+
std::string TestInvalidResource();
std::string TestInvalidSize();
std::string TestHumongous();
@@ -79,6 +88,7 @@ class TestGraphics2D : public TestCase {
std::string TestReplace();
std::string TestFlush();
std::string TestDev();
+ std::string TestReplaceContentsCaching();
// Used by the tests that access the C API directly.
const PPB_Graphics2D* graphics_2d_interface_;

Powered by Google App Engine
This is Rietveld 408576698