Merge "Add basic test for retrieving the plugin's visible rect." into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
670c7974a6
@@ -34,7 +34,7 @@ extern ANPCanvasInterfaceV0 gCanvasI;
|
||||
extern ANPPaintInterfaceV0 gPaintI;
|
||||
extern ANPPathInterfaceV0 gPathI;
|
||||
extern ANPSystemInterfaceV0 gSystemI;
|
||||
extern ANPWindowInterfaceV0 gWindowI;
|
||||
extern ANPWindowInterfaceV1 gWindowI;
|
||||
|
||||
static uint16_t rnd16(float x, int inset) {
|
||||
int ix = (int)roundf(x) + inset;
|
||||
@@ -119,6 +119,11 @@ void BallAnimation::showEntirePluginOnScreen() {
|
||||
PluginObject *obj = (PluginObject*) instance->pdata;
|
||||
NPWindow *window = obj->window;
|
||||
|
||||
// log the current visible rect
|
||||
ANPRectI visibleRect = gWindowI.visibleRect(instance);
|
||||
gLogI.log(kDebug_ANPLogType, "Current VisibleRect: (%d,%d,%d,%d)",
|
||||
visibleRect.left, visibleRect.top, visibleRect.right, visibleRect.bottom);
|
||||
|
||||
ANPRectI visibleRects[1];
|
||||
|
||||
visibleRects[0].left = 0;
|
||||
|
||||
@@ -76,7 +76,7 @@ ANPPathInterfaceV0 gPathI;
|
||||
ANPSurfaceInterfaceV0 gSurfaceI;
|
||||
ANPSystemInterfaceV0 gSystemI;
|
||||
ANPTypefaceInterfaceV0 gTypefaceI;
|
||||
ANPWindowInterfaceV0 gWindowI;
|
||||
ANPWindowInterfaceV1 gWindowI;
|
||||
ANPOpenGLInterfaceV0 gOpenGLI;
|
||||
|
||||
#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
|
||||
@@ -125,7 +125,7 @@ NPError NP_Initialize(NPNetscapeFuncs* browserFuncs, NPPluginFuncs* pluginFuncs,
|
||||
{ kSurfaceInterfaceV0_ANPGetValue, sizeof(gSurfaceI), &gSurfaceI },
|
||||
{ kSystemInterfaceV0_ANPGetValue, sizeof(gSystemI), &gSystemI },
|
||||
{ kTypefaceInterfaceV0_ANPGetValue, sizeof(gTypefaceI), &gTypefaceI },
|
||||
{ kWindowInterfaceV0_ANPGetValue, sizeof(gWindowI), &gWindowI },
|
||||
{ kWindowInterfaceV1_ANPGetValue, sizeof(gWindowI), &gWindowI },
|
||||
{ kOpenGLInterfaceV0_ANPGetValue, sizeof(gOpenGLI), &gOpenGLI },
|
||||
};
|
||||
for (size_t i = 0; i < ARRAY_COUNT(gPairs); i++) {
|
||||
|
||||
Reference in New Issue
Block a user