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

Side by Side Diff: third_party/libva/test/putsurface/putsurface_android.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 /*
2 * Copyright (c) 2008-2009 Intel Corporation. All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24 #include <stdio.h>
25 #include <va/va.h>
26 #include <va/va_android.h>
27 #include <binder/IPCThreadState.h>
28 #include <binder/ProcessState.h>
29 #include <binder/IServiceManager.h>
30 #include <utils/Log.h>
31 #include <surfaceflinger/ISurfaceComposer.h>
32 #include <surfaceflinger/Surface.h>
33 #include <surfaceflinger/ISurface.h>
34 #include <surfaceflinger/SurfaceComposerClient.h>
35 #include <binder/MemoryHeapBase.h>
36 #include <assert.h>
37 #include <pthread.h>
38
39 static int android_display=0;
40
41 using namespace android;
42 #include "../android_winsys.cpp"
43
44 sp<SurfaceComposerClient> client;
45 sp<Surface> android_surface;
46 sp<ISurface> android_isurface;
47 sp<SurfaceControl> surface_ctrl;
48
49 sp<SurfaceComposerClient> client1;
50 sp<Surface> android_surface1;
51 sp<ISurface> android_isurface1;
52 sp<SurfaceControl> surface_ctrl1;
53
54 static void *open_display(void);
55 static void close_display(void *win_display);
56 static int create_window(void *win_display, int x, int y, int width, int height) ;
57 static int check_window_event(void *x11_display, void *win, int *width, int *hei ght, int *quit);
58
59 #define CAST_DRAWABLE(a) static_cast<ISurface*>((void *)(*(unsigned int *)a))
60 #include "putsurface_common.c"
61
62 static void *open_display()
63 {
64 return &android_display;
65 }
66
67 static void close_display(void *win_display)
68 {
69 return;
70 }
71
72 static int create_window(void *win_display, int x, int y, int width, int height)
73 {
74 sp<ProcessState> proc(ProcessState::self());
75 ProcessState::self()->startThreadPool();
76
77 printf("Create window0 for thread0\n");
78 SURFACE_CREATE(client,surface_ctrl,android_surface, android_isurface, x, y, width, height);
79
80 drawable_thread0 = static_cast<void*>(&android_isurface);
81 if (multi_thread == 0)
82 return 0;
83
84 printf("Create window1 for thread1\n");
85 /* need to modify here jgl*/
86 SURFACE_CREATE(client1,surface_ctrl1,android_surface1, android_isurface1, x, y, width, height);
87 drawable_thread1 = static_cast<void *>(&android_isurface);
88
89 return 0;
90 }
91
92 int check_window_event(void *win_display, void *drawble, int *width, int *height , int *quit)
93 {
94 return 0;
95 }
96
97
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698