-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmsdk: Add initial DisplayMode and AutoContrast support to CMHW
Change-Id: I71f3599c64c03efc4b090ea71e583c942d0c03c2
- Loading branch information
1 parent
5ee87cb
commit e18f6d8
Showing
5 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (C) 2015 The CyanogenMod 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. | ||
*/ | ||
|
||
package cyanogenmod.hardware; | ||
|
||
parcelable DisplayMode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (C) 2015 The CyanogenMod 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. | ||
*/ | ||
|
||
package cyanogenmod.hardware; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
/* | ||
* Display Modes API | ||
* | ||
* A device may implement a list of preset display modes for different | ||
* viewing intents, such as movies, photos, or extra vibrance. These | ||
* modes may have multiple components such as gamma correction, white | ||
* point adjustment, etc, but are activated by a single control point. | ||
* | ||
* This API provides support for enumerating and selecting the | ||
* modes supported by the hardware. | ||
* | ||
* A DisplayMode is referenced by it's identifier and carries an | ||
* associated name (up to the user to translate this value). | ||
*/ | ||
public class DisplayMode implements Parcelable { | ||
public final int id; | ||
public final String name; | ||
|
||
public DisplayMode(int id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel out, int flags) { | ||
out.writeInt(id); | ||
out.writeString(name); | ||
} | ||
|
||
/** @hide */ | ||
public static final Parcelable.Creator<DisplayMode> CREATOR = new Parcelable.Creator<DisplayMode>() { | ||
public DisplayMode createFromParcel(Parcel in) { | ||
return new DisplayMode(in.readInt(), in.readString()); | ||
} | ||
|
||
@Override | ||
public DisplayMode[] newArray(int size) { | ||
return new DisplayMode[size]; | ||
} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters