|
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 |
|
15 #include "driverrfc.h" |
|
16 #include "serialisedapiuids.h" |
|
17 |
|
18 // ----------------------------------------------------------------------------- |
|
19 // |
|
20 // ----------------------------------------------------------------------------- |
|
21 // |
|
22 //DriverRFC::DriverRFC( RemoteFunctionCallData& aData ): |
|
23 // RemoteFunctionCall( aData ) |
|
24 // { |
|
25 // } |
|
26 |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 TInt DriverRFC::GetTypeAlignment( TInt32 aType ) const |
|
33 { |
|
34 TInt ret(0); |
|
35 if ( EEGLVoid == aType ) |
|
36 { |
|
37 ret = 4; |
|
38 } |
|
39 else |
|
40 { |
|
41 ret = GetTypeSize( aType ); |
|
42 } |
|
43 return ret; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 TInt DriverRFC::GetTypeSize( TInt32 aType ) const |
|
51 { |
|
52 TInt size(0); |
|
53 switch ( aType ) |
|
54 { |
|
55 case EEGLVoid: |
|
56 size = 1; |
|
57 break; |
|
58 case EEGLBoolean: |
|
59 case EEGLint: |
|
60 case EEGLenum: |
|
61 case EEGLDisplay: |
|
62 case EEGLConfig: |
|
63 case EEGLSurface: |
|
64 case EEGLContext: |
|
65 case EEGLClientBuffer: |
|
66 case EEGLImageKHR: |
|
67 case EEGLNativeDisplayType: |
|
68 case EEGLNativeWindowType: |
|
69 case EEGLNativePixmapType: |
|
70 case ETUint32: |
|
71 size = 4; |
|
72 break; |
|
73 //VG Types |
|
74 case EVGvoid: |
|
75 case EVGbyte: |
|
76 case EVGubyte: |
|
77 size = 1; |
|
78 break; |
|
79 case EVGshort: |
|
80 size = 2; |
|
81 break; |
|
82 case EVGfloat: |
|
83 case EVGint: |
|
84 case EVGuint: |
|
85 case EVGbitfield: |
|
86 case EVGboolean: |
|
87 case EVGHandle: |
|
88 case EVGErrorCode: |
|
89 case EVGParamType: |
|
90 case EVGRenderingQuality: |
|
91 case EVGPixelLayout: |
|
92 case EVGMatrixMode: |
|
93 case EVGMaskOperation: |
|
94 case EVGPathDatatype: |
|
95 case EVGPathAbsRel: |
|
96 case EVGPathSegment: |
|
97 case EVGPathCommand: |
|
98 case EVGPath: |
|
99 case EVGPathCapabilities: |
|
100 case EVGPathParamType: |
|
101 case EVGCapStyle: |
|
102 case EVGJoinStyle: |
|
103 case EVGFillRule: |
|
104 case EVGPaintMode: |
|
105 case EVGPaint: |
|
106 case EVGPaintParamType: |
|
107 case EVGPaintType: |
|
108 case EVGColorRampSpreadMode: |
|
109 case EVGTilingMode: |
|
110 case EVGImageFormat: |
|
111 case EVGImage: |
|
112 case EVGImageQuality: |
|
113 case EVGImageParamType: |
|
114 case EVGImageMode: |
|
115 case EVGImageChannel: |
|
116 case EVGBlendMode: |
|
117 case EVGHardwareQueryType: |
|
118 case EVGHardwareQueryResult: |
|
119 case EVGStringID: |
|
120 case EVGeglImageKHR: |
|
121 size = 4; |
|
122 break; |
|
123 default: |
|
124 ASSERT( EFalse ); |
|
125 break; |
|
126 } |
|
127 return size; |
|
128 } |