diff options
| author | 2009-07-30 18:46:48 -0700 | |
|---|---|---|
| committer | 2009-07-30 18:46:48 -0700 | |
| commit | fa170f513338322102a200de7d1fd696e51d55c8 (patch) | |
| tree | c4b7c19f4b78cf2e8805b675e25dc4dd99e227eb /libs/ui/FramebufferNativeWindow.cpp | |
| parent | b6db63a126967bb533966bfa946d963ad90d69a7 (diff) | |
| parent | cb6b9041647b4f080324742eee5ce709960ff610 (diff) | |
Merge change 9287
* changes:
  fixed some issues with the software renderer when surfaces are made current.
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
| -rw-r--r-- | libs/ui/FramebufferNativeWindow.cpp | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp index 8c8fd6bb0f..8b7ea21d73 100644 --- a/libs/ui/FramebufferNativeWindow.cpp +++ b/libs/ui/FramebufferNativeWindow.cpp @@ -124,6 +124,7 @@ FramebufferNativeWindow::FramebufferNativeWindow()      android_native_window_t::dequeueBuffer = dequeueBuffer;      android_native_window_t::lockBuffer = lockBuffer;      android_native_window_t::queueBuffer = queueBuffer; +    android_native_window_t::query = query;  }  FramebufferNativeWindow::~FramebufferNativeWindow() { @@ -198,6 +199,23 @@ int FramebufferNativeWindow::queueBuffer(android_native_window_t* window,      return res;  } +int FramebufferNativeWindow::query(android_native_window_t* window, +        int what, int* value)  +{ +    FramebufferNativeWindow* self = getSelf(window); +    Mutex::Autolock _l(self->mutex); +    framebuffer_device_t* fb = self->fbDev; +    switch (what) { +        case NATIVE_WINDOW_WIDTH: +            *value = fb->width; +            return NO_ERROR; +        case NATIVE_WINDOW_HEIGHT: +            *value = fb->height; +            return NO_ERROR; +    } +    return BAD_VALUE; +} +  // ----------------------------------------------------------------------------  }; // namespace android  // ---------------------------------------------------------------------------- |