+ bool clearFullFrameRect = true;
+ if( instruction.mFrameBuffer != 0 )
+ {
+ Viewport frameRect( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
+ clearFullFrameRect = ( frameRect == viewportRect );
+ }
+ else
+ {
+ clearFullFrameRect = ( surfaceRect == viewportRect );
+ }
+
+ if ( surfaceOrientation == 90 || surfaceOrientation == 270 )
+ {
+ int temp = viewportRect.width;
+ viewportRect.width = viewportRect.height;
+ viewportRect.height = temp;
+ }
+