diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 19:52:22 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-07-25 21:15:25 -0700 |
commit | 9261bae1d2a769cb7453d2cadb6040be38ec86e5 (patch) | |
tree | b9edeeb20bf20eb9f76902a9671dbe10e871717b /camera/libcameraservice/FakeCamera.cpp | |
parent | 4cce5bd5ccc7c8468d0f8cc359525f82a45dedec (diff) | |
parent | 4d3b5c1e36f2a3746a1c87f8af97d4fe97e8f49e (diff) | |
download | frameworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.zip frameworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.tar.gz frameworks_native-9261bae1d2a769cb7453d2cadb6040be38ec86e5.tar.bz2 |
Merge korg/donut into korg/master
Diffstat (limited to 'camera/libcameraservice/FakeCamera.cpp')
-rw-r--r-- | camera/libcameraservice/FakeCamera.cpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/camera/libcameraservice/FakeCamera.cpp b/camera/libcameraservice/FakeCamera.cpp index 3592eab..3daf47d 100644 --- a/camera/libcameraservice/FakeCamera.cpp +++ b/camera/libcameraservice/FakeCamera.cpp @@ -1,12 +1,39 @@ +/* +** +** Copyright 2008, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + #define LOG_TAG "FakeCamera" #include <utils/Log.h> #include <string.h> #include <stdlib.h> +#include <utils/String8.h> + #include "FakeCamera.h" + namespace android { +// TODO: All this rgb to yuv should probably be in a util class. + +// TODO: I think something is wrong in this class because the shadow is kBlue +// and the square color should alternate between kRed and kGreen. However on the +// emulator screen these are all shades of gray. Y seems ok but the U and V are +// probably not. + static int tables_initialized = 0; uint8_t *gYTable, *gCbTable, *gCrTable; @@ -389,7 +416,7 @@ void FakeCamera::drawCheckerboard(uint16_t *dst, int size) } -status_t FakeCamera::dump(int fd, const Vector<String16>& args) +void FakeCamera::dump(int fd) const { const size_t SIZE = 256; char buffer[SIZE]; @@ -397,7 +424,6 @@ status_t FakeCamera::dump(int fd, const Vector<String16>& args) snprintf(buffer, 255, " width x height (%d x %d), counter (%d), check x-y coordinate(%d, %d)\n", mWidth, mHeight, mCounter, mCheckX, mCheckY); result.append(buffer); ::write(fd, result.string(), result.size()); - return NO_ERROR; } |