GammaFontRenderer.h revision b45c0c9774bd19a9dbe77d149abae4e124b08bf6
1b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy/* 2b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * Copyright (C) 2010 The Android Open Source Project 3b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * 4b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * Licensed under the Apache License, Version 2.0 (the "License"); 5b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * you may not use this file except in compliance with the License. 6b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * You may obtain a copy of the License at 7b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * 8b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * http://www.apache.org/licenses/LICENSE-2.0 9b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * 10b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * Unless required by applicable law or agreed to in writing, software 11b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * distributed under the License is distributed on an "AS IS" BASIS, 12b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * See the License for the specific language governing permissions and 14b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy * limitations under the License. 15b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy */ 16b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 17b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy#ifndef ANDROID_UI_GAMMA_FONT_RENDERER_H 18b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy#define ANDROID_UI_GAMMA_FONT_RENDERER_H 19b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 20b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy#include <SkPaint.h> 21b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 22b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy#include "FontRenderer.h" 23b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 24b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guynamespace android { 25b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guynamespace uirenderer { 26b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 27b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guystruct GammaFontRenderer { 28b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy GammaFontRenderer(); 29b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 30b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy FontRenderer& getFontRenderer(const SkPaint* paint); 31b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 32b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guyprivate: 33b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy FontRenderer mDefaultRenderer; 34b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy FontRenderer mBlackGammaRenderer; 35b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy FontRenderer mWhiteGammaRenderer; 36b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 37b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy int mBlackThreshold; 38b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy int mWhiteThreshold; 39b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 40b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy uint8_t mDefault[256]; 41b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy uint8_t mBlackGamma[256]; 42b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy uint8_t mWhiteGamma[256]; 43b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy}; 44b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 45b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy}; // namespace uirenderer 46b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy}; // namespace android 47b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy 48b45c0c9774bd19a9dbe77d149abae4e124b08bf6Romain Guy#endif // ANDROID_UI_GAMMA_FONT_RENDERER_H 49