summaryrefslogtreecommitdiff
path: root/merrifield/include/GraphicBuffer.h
diff options
context:
space:
mode:
authorBenjamin Pujol <benjamin.pujol@intel.com>2015-04-01 07:32:18 +0200
committerHeather Lee Wilson <hwilson@google.com>2015-04-09 12:10:36 -0700
commit8b0063f7f46289983bd1bf9ca61662b4a2ddf5b6 (patch)
tree2a97a83a92c17f81dc0deaf7dd5ee7b21ad92693 /merrifield/include/GraphicBuffer.h
parentb4201ddf6cb717a9df706bd8d290b3d792acd6a9 (diff)
downloadhwcomposer-8b0063f7f46289983bd1bf9ca61662b4a2ddf5b6.tar.gz
First hwcomposer code drop for marvin
Issued from Intel internal commit : 58771d Change-Id: I8437d663e3b9baa0164517c0ece83b77b5864e8f Signed-off-by: Benjamin Pujol <benjamin.pujol@intel.com> Signed-off-by: Victor Tasayco Loarte <victorx.tasayco.loarte@intel.com> Signed-off-by: Guilhem IMBERTON <guilhem.imberton@intel.com>
Diffstat (limited to 'merrifield/include/GraphicBuffer.h')
-rw-r--r--merrifield/include/GraphicBuffer.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/merrifield/include/GraphicBuffer.h b/merrifield/include/GraphicBuffer.h
new file mode 100644
index 0000000..65320d8
--- /dev/null
+++ b/merrifield/include/GraphicBuffer.h
@@ -0,0 +1,57 @@
+/*
+// Copyright (c) 2014 Intel Corporation 
+//
+// 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.
+*/
+#ifndef GRAPHIC_BUFFER_H
+#define GRAPHIC_BUFFER_H
+
+#include <DataBuffer.h>
+
+
+namespace android {
+namespace intel {
+
+class GraphicBuffer : public DataBuffer {
+public:
+ enum {
+ USAGE_INVALID = 0xffffffff,
+ };
+
+public:
+ GraphicBuffer(buffer_handle_t handle);
+ virtual ~GraphicBuffer() {}
+
+ virtual void resetBuffer(buffer_handle_t handle);
+
+ uint32_t getUsage() const { return mUsage; }
+ uint32_t getBpp() const { return mBpp; }
+
+ static bool isProtectedUsage(uint32_t usage);
+ static bool isProtectedBuffer(GraphicBuffer *buffer);
+
+ static bool isCompressionUsage(uint32_t usage);
+ static bool isCompressionBuffer(GraphicBuffer *buffer);
+
+private:
+ void initBuffer(buffer_handle_t handle);
+
+protected:
+ uint32_t mUsage;
+ uint32_t mBpp;
+};
+
+} // namespace intel
+} // namespace android
+
+#endif /* GRAPHIC_BUFFER_H */