graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c
branchRCL_3
changeset 20 25ffed67c7ef
parent 19 bbf46f59e123
--- a/graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c	Tue Aug 31 16:31:06 2010 +0300
+++ b/graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c	Wed Sep 01 12:39:21 2010 +0100
@@ -1,5 +1,4 @@
-/* Copyright (c) 2009-2010 The Khronos Group Inc.
- * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
+/* Copyright (c) 2009 The Khronos Group Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and/or associated documentation files (the
@@ -259,15 +258,17 @@
     {
         screenNumber = OWF_Screen_GetDefaultNumber();
     }
-    
-    /* check screen number validity */
-    if (!OWF_Screen_Valid(screenNumber))
+    else
     {
-        FAIL(WFC_ERROR_UNSUPPORTED, WFC_INVALID_HANDLE);
+        /* check screen number validity */
+        if (!OWF_Screen_Valid(screenNumber))
+        {
+            FAIL(WFC_ERROR_UNSUPPORTED, WFC_INVALID_HANDLE);
+        }
     }
 
     /* check that no other context currently uses this screen */
-    if (WFC_Device_FindScreenNumber(screenNumber))
+    if (!OWF_Screen_Valid_And_Available(screenNumber))
     {
         FAIL(WFC_ERROR_IN_USE, WFC_INVALID_HANDLE);
     }
@@ -944,9 +945,6 @@
 
     case WFC_EXTENSIONS:
         tmp = &wfc_extensions[0];
-		/* we know that wfc_extensions always has NULL as the last member 
-		   so this loop will never exceed the size of tmp */
-		/* coverity[overrun-local] */
         for (retVal=0; tmp[retVal] != NULL; retVal++)
         {
             /* get extensions array size */
@@ -1003,7 +1001,7 @@
 /*=========================================================================*/
 
 WFC_API_CALL WFCNativeStreamType WFC_APIENTRY
-extwfcGetOnScreenStream(WFCDevice dev, WFCContext ctx) WFC_APIEXIT
+wfcGetOnScreenStream(WFCDevice dev, WFCContext ctx) WFC_APIEXIT
 {
 	WFC_DEVICE*             device;
 	WFC_CONTEXT*            context;
@@ -1017,8 +1015,6 @@
 	/* Protect context's target stream from being destroyed by the user
 	 * WFC_CONTEXT_Dtor will reset this flag. */
 	owfNativeStreamSetProtectionFlag(context->stream, OWF_TRUE);
-	
-	OWF_DisplayContext_FlagInternalStreamAccessed(context->displayContext);
 
 	SUCCEED(context->stream);
 }