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

Side by Side Diff: third_party/libva/test/android_winsys.cpp

Issue 10375035: Add libva to chromium third_party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
(Empty)
1 #include <ui/DisplayInfo.h>
2
3 namespace android {
4 class Test {
5 public:
6 static const sp<ISurface>& getISurface(const sp<Surface>& s) {
7 return s->getISurface();
8 }
9 };
10 };
11
12 #define min(a,b) (a<b?a:b)
13 #define SURFACE_CREATE(client,surface_ctrl,android_surface, android_isurface, x, y, win_width, win_height) \
14 do { \
15 client = new SurfaceComposerClient(); \
16 android::DisplayInfo info; \
17 int w, h; \
18 \
19 client->getDisplayInfo(android::DisplayID(0), &info); \
20 /*w = min(win_width, info.w);*/ \
21 /*h = min(win_height, info.h);*/ \
22 w = win_width, h = win_height; \
23 \
24 surface_ctrl = client->createSurface(getpid(), 0, w, h, PIXEL_FORMAT_RGB_565 , ISurfaceComposer::ePushBuffers); \
25 android_surface = surface_ctrl->getSurface(); \
26 android_isurface = Test::getISurface(android_surface); \
27 \
28 client->openTransaction(); \
29 surface_ctrl->setPosition(x, y); \
30 client->closeTransaction(); \
31 \
32 client->openTransaction(); \
33 surface_ctrl->setSize(w, h); \
34 client->closeTransaction(); \
35 \
36 client->openTransaction(); \
37 surface_ctrl->setLayer(0x100000); \
38 client->closeTransaction(); \
39 } while (0)
40
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698