Commit Graph
57 Commits
Author SHA1 Message Date
dhewg 57635fe75c ANDROID: Update screen rects on surface changes
Fixes regression introduced with 4267011e
2011-03-14 19:35:35 +01:00
dhewg 4b6e5e7b06 ANDROID: Clip mouse coordinates 2011-03-13 23:45:52 +01:00
dhewg f82121d2a2 ANDROID: Don't merge mouse move events
Breaks more than it solves
2011-03-13 23:31:07 +01:00
dhewg df9167c6b3 ANDROID: Add graphics mode for linear filtering 2011-03-13 23:30:17 +01:00
dhewg 2dd669d808 ANDROID: Remove leftover TODO
Resolved with a93229c and 2721e28
2011-03-13 23:30:17 +01:00
dhewg 79d991081d ANDROID: Add support for video feature flags
kFeatureFullscreenMode and kFeatureAspectRatioCorrection are supported
now. The former prevents scaling to the full display - it scales one
axis and keeps the game AR.
2011-03-13 23:30:16 +01:00
dhewg 787b27a4b1 ANDROID: Add missing updateScreen() calls 2011-03-13 16:50:48 +01:00
dhewg 2721e287e5 ANDROID: Buffer 16bit texture contents
Same issue as in the last commit: glTexSubImage2D is slow, so cache
all copyRect*() calls in a buffer, and update the dirty rect once
when drawing. Reduces CPU usage on 16bit games significantly.
Also, lockScreen() returns now pixel data for non-CLUT8 games instead
of asserting.
2011-03-13 16:50:47 +01:00
dhewg a93229cae5 ANDROID: Don't use compressed textures for the game screen
Some GLES drivers suck so much that uploading data to the GPU takes
ages. CLUT8 games now use a faked paletted texture, which internally
uses a RGB565 hardware texture (Android's native pixel format).
This seems to be the only way to efficiently implement constant
changing textures with GLES1 - at the cost of extra buffers.
Then again, we can now use glTexSubImage2D to only update the dirty
rects, which wasn't possible before because glCompressedTexSubImage2D
is only usable on GLES2. This commit does exactly that.
Overall, the CPU usage is massively reduced for CLUT8 games.
2011-03-13 16:50:43 +01:00
dhewg 0cdaff65c1 ANDROID: Use 16bit pixel formats on CLUT8 textures
This reduces the CPU usage on 640x480 games by ~5% on my droid when
reuploading the textures to the GPU
2011-03-12 09:36:23 +01:00
dhewg e71fb5b0eb ANDROID: Move the overlay initialization
There's no point in doing that in initSize() every time
2011-03-07 23:42:20 +01:00
dhewg 94db3403a3 ANDROID: Add initial 16bit gfx support
Supported pixel formats: 565, 5551, 4444
Missing: 555 (doesn't exist on GLES)
2011-03-05 18:47:05 +01:00
dhewg 68378150be ANDROID: Remove some vtable overhead on textures 2011-03-05 11:00:36 +01:00
dhewg 7157454e9b ANDROID: Implement surface resizes
Split surface code into helper functions to avoid code duplication, and
distinguish between screen resizes and surface recreation. The former
happens when toggling the softkeyb, where we just have to reset the
viewport. Fixes garbled textures in those cases.
2011-03-03 21:29:15 +01:00
dhewg a7a7542d1d ANDROID: Remove an indirection when pausing 2011-03-03 20:47:27 +01:00
dhewg 1e3c96b3ef ANDROID: Formatting/whitespaces 2011-03-03 20:46:49 +01:00
dhewg 2d4a64d184 ANDROID: Properly release texture resources
When calling glDeleteTextures() we need a valid surface.
2011-03-02 23:18:36 +01:00
dhewg c2d4cce429 ANDROID: On pause, put all threads in a coma
Since not every engine respects pauseEngine(), or they're in a state
where it simply gets ignored, put all threads in a group coma. Without
this, code still kept looping and wasting cpu cycles, while the user
might want to do use her/his droid for something else.
2011-03-02 23:18:35 +01:00
dhewg ccfe427eb5 ANDROID: Check for a surface in updateScreen() 2011-03-02 23:18:35 +01:00
dhewg bd7e3e9bb2 ANDROID: cleanup 2011-03-02 23:18:34 +01:00
dhewg 2333a32697 ANDROID: Untangle JNI interweaving
- make the startup sequence more linear
- use SurfaceHolder events
- get rid of the surface lock
- remove unnecessary JNI calls
- make the ScummVM class implement Runnable
- cleanup
2011-03-02 23:18:34 +01:00
dhewg 807971f8af ANDROID: Don't use warning()/error() in a thread 2011-03-02 23:18:33 +01:00
dhewg 24a332bd22 ANDROID: Prevent AudioTrack unpause on startup 2011-02-27 14:15:47 +01:00
dhewg 72889ee24f ANDROID: Remove dead code 2011-02-27 14:15:47 +01:00
dhewg d4c0501d1f ANDROID: Check audio buffer for silence
Most games register a music channel, and when there is no music,
they still stream silence (and run through all the Converter::flow
code!). Scan the buffer for that to pause the AudioTrack. Ugly, but
worth it - reduces CPU usage on many games and hence saves battery life.
2011-02-27 09:04:37 +01:00
dhewg 0e869a5cf0 ANDROID: Pause the AudioTrack when possible
Only works in situations without any registered channels (or all paused)
at the mixer (like on the launcher or GMM).

CPU usage before (Galaxy Tab):
~5% scummvm
~15% mediaserver

After:
~2% scummvm
0% mediaserver

;)
2011-02-27 09:04:37 +01:00
dhewg 25d895b859 ANDROID: Rework audio system
Move the audio thread to the bright side
2011-02-27 09:04:36 +01:00
dhewg a636d41ca8 ANDROID: Check thread origin when debugging GL 2011-02-24 23:18:34 +01:00
dhewg 53b5808d4f ANDROID: Move rest of everything JNI 2011-02-24 23:18:32 +01:00
dhewg f80d993860 ANDROID: Wrap JNI code in a class 2011-02-24 23:18:32 +01:00
dhewg c4706733d4 ANDROID: Move the global back reference to jni.cpp 2011-02-24 23:18:32 +01:00
dhewg 257913676d ANDROID: Split code into multiple files
And get rid of unnecessary JNI calls to get a pointer to g_system
2011-02-24 23:18:31 +01:00
dhewg 90fa5087dc ANDROID: Fix cursor scaling 2011-02-19 23:25:05 +01:00
dhewg 6c123974c0 ANDROID: Fix cursor when hotspot coords > 0 2011-02-19 23:24:59 +01:00
Johannes Schickel e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +01:00
dhewg adf2225eb4 ANDROID: Move helper defines in a new header file
- added a few macros for convinience
- use them
- replaced CHECK_GL_ERROR with GLCALL
- spam GLCALL
2011-02-19 20:15:51 +01:00
dhewg feb0efe767 ANDROID: Formatting 2011-02-19 20:15:50 +01:00
dhewg 84e632cc9d ANDROID: Formatting
maybe now?
2011-02-18 21:38:26 +01:00
dhewg 106253b8b9 ANDROID: Formatting
and hoping for buildbot to pick up the toolchain now
2011-02-18 21:32:37 +01:00
dhewg ad94ac343a ANDROID: Adapt to [set|grab]Palette RGBA->RGB change. 2011-02-14 20:26:35 +01:00
dhewg 2586e15e4e ANDROID: Fix JNI calls for the timer thread
JNI calls can happen through the timer mechanism (hence from another
thread). Attach the timer thread to the VM to prevent assert()s
2011-02-14 18:58:56 +01:00
dhewg ea2cfc44c0 ANDROID: Fix assert() to log output
add bionic replacement __assert2(), so we actually see what's happening
2011-02-14 18:58:56 +01:00
dhewg bf237c8d2c ANDROID: Unify log prefix
adb logcat ScummVM:\* \*:S
2011-02-14 18:58:56 +01:00
dhewg 8de5edde95 ANDROID: Protect port files with our define
get rid of -DANDROID and -DANDROID_BACKEND
2011-02-14 18:58:55 +01:00
Max Horn 42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Johannes Schickel e1030e53a5 BACKENDS: Implement logging API proposed by Max on -devel.
This commits a slightly modified patch from my patch tracker item #3104630
"OSYSTEM: Add logging API as proposed by Max on -devel".

I was not able to test compilation on Android and SamsungTV, since there is no
toolchain for those on buildbot (or I was too blind to find them).

svn-id: r54339
2010-11-18 19:12:14 +00:00
Angus Lees 2bf64b1050 ANDROID: Force extra screen update when updating overlay.
This appears to work around a blank screen bug Nexus1.  I never
tracked it down, but as far as I can tell it is triggered by multiple
overlapping updates before flushing the texture to screen.  This
condition only happens in the overlay atm so an extra redraw isn't the
end of the world.

(Also remove an unused _full_screen_dirty property)

svn-id: r53801
2010-10-25 07:27:05 +00:00
Jordi Vilalta Prat 8388e0dfea JANITORAL: Clean trailing whitespaces.
svn-id: r53160
2010-10-12 02:18:11 +00:00
Torbjörn Andersson c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00