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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool IsSquareInDC(const pp::Graphics2D& dc, uint32_t background_color, 62 bool IsSquareInDC(const pp::Graphics2D& dc, uint32_t background_color,
63 const pp::Rect& square, uint32_t square_color) const; 63 const pp::Rect& square, uint32_t square_color) const;
64 64
65 // Validates that the given device context is filled with the given color. 65 // Validates that the given device context is filled with the given color.
66 bool IsDCUniformColor(const pp::Graphics2D& dc, uint32_t color) const; 66 bool IsDCUniformColor(const pp::Graphics2D& dc, uint32_t color) const;
67 67
68 // Issues a flush on the given device context and blocks until the flush 68 // Issues a flush on the given device context and blocks until the flush
69 // has issued its callback. Returns true on success. 69 // has issued its callback. Returns true on success.
70 bool FlushAndWaitForDone(pp::Graphics2D* context); 70 bool FlushAndWaitForDone(pp::Graphics2D* context);
71 71
72 // Creates an image and replaces the contents of the Graphics2D with the
73 // image, waiting for completion. This returns the resource ID of the image
74 // data we created. This image data will be released by the time the call
75 // completes, but it can be used for comparisons later.
76 //
77 // Returns 0 on failure.
78 PP_Resource ReplaceContentsAndReturnID(pp::Graphics2D* dc,
79 const pp::Size& size);
80
72 std::string TestInvalidResource(); 81 std::string TestInvalidResource();
73 std::string TestInvalidSize(); 82 std::string TestInvalidSize();
74 std::string TestHumongous(); 83 std::string TestHumongous();
75 std::string TestInitToZero(); 84 std::string TestInitToZero();
76 std::string TestDescribe(); 85 std::string TestDescribe();
77 std::string TestPaint(); 86 std::string TestPaint();
78 std::string TestScroll(); 87 std::string TestScroll();
79 std::string TestReplace(); 88 std::string TestReplace();
80 std::string TestFlush(); 89 std::string TestFlush();
81 std::string TestDev(); 90 std::string TestDev();
91 std::string TestReplaceContentsCaching();
82 92
83 // Used by the tests that access the C API directly. 93 // Used by the tests that access the C API directly.
84 const PPB_Graphics2D* graphics_2d_interface_; 94 const PPB_Graphics2D* graphics_2d_interface_;
85 const PPB_ImageData* image_data_interface_; 95 const PPB_ImageData* image_data_interface_;
86 }; 96 };
87 97
88 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_ 98 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698