Lines Matching defs:CopyBit
22 #include <copybit.h>
67 void CopyBit::reset() {
72 bool CopyBit::canUseCopybitForYUV(hwc_context_t *ctx) {
80 bool CopyBit::canUseCopybitForRGB(hwc_context_t *ctx,
89 //Overlay up & running. Dont use COPYBIT for RGB layers.
96 // use copybit, if (TotalRGBRenderArea < threashold * FB Area)
109 // MDP composition, use COPYBIT always
112 // C2D composition, use COPYBIT
118 unsigned int CopyBit::getRGBRenderingArea
135 bool CopyBit::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list,
139 // No copybit device found - cannot use copybit
194 // We currently cannot mix copybit layers with layers marked to
204 int CopyBit::clear (private_handle_t* hnd, hwc_rect_t& rect)
218 copybit_device_t *copybit = mEngine;
219 ret = copybit->clear(copybit, &buf, &clear_rect);
223 bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
225 // draw layers marked for COPYBIT
230 if(mCopyBitDraw == false) // there is no layer marked for copybit
256 ALOGD_IF(DEBUG_COPYBIT, "%s: Not Marked for copybit", __FUNCTION__);
279 copybit_device_t *copybit = getCopyBitDevice();
281 copybit->flush_get_fence(copybit, fd);
286 int CopyBit::drawLayerUsingCopybit(hwc_context_t *dev, hwc_layer_1_t *layer,
308 // Set the copybit source:
321 // Copybit source rect
327 // Copybit destination rect
333 // Copybit dst
341 copybit_device_t *copybit = mEngine;
348 // Copybit dst
350 (float)copybit->get(copybit,COPYBIT_MAGNIFICATION_LIMIT);
352 (float)copybit->get(copybit,COPYBIT_MINIFICATION_LIMIT);
436 copybit->set_parameter(copybit,COPYBIT_TRANSFORM,0);
438 copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 255);
439 err = copybit->stretch(copybit,&tmp_dst, &src, &tmp_rect,
442 ALOGE("%s:%d::tmp copybit stretch failed",__FUNCTION__,
453 // Copybit region
457 copybit->set_parameter(copybit, COPYBIT_FRAMEBUFFER_WIDTH,
459 copybit->set_parameter(copybit, COPYBIT_FRAMEBUFFER_HEIGHT,
461 copybit->set_parameter(copybit, COPYBIT_TRANSFORM,
464 copybit->set_parameter(copybit, COPYBIT_PLANE_ALPHA, 255);
465 copybit->set_parameter(copybit, COPYBIT_BLEND_MODE,
467 copybit->set_parameter(copybit, COPYBIT_DITHER,
470 copybit->set_parameter(copybit, COPYBIT_BLIT_TO_FRAMEBUFFER,
472 err = copybit->stretch(copybit, &dst, &src, &dstRect, &srcRect,
474 copybit->set_parameter(copybit, COPYBIT_BLIT_TO_FRAMEBUFFER,
481 ALOGE("%s: copybit stretch failed",__FUNCTION__);
485 void CopyBit::getLayerResolution(const hwc_layer_1_t* layer,
494 bool CopyBit::validateParams(hwc_context_t *ctx,
508 int CopyBit::allocRenderBuffers(int w, int h, int f)
525 void CopyBit::freeRenderBuffers()
535 private_handle_t * CopyBit::getCurrentRenderBuffer() {
539 void CopyBit::setReleaseFd(int fd) {
546 struct copybit_device_t* CopyBit::getCopyBitDevice() {
550 CopyBit::CopyBit():mIsModeOn(false), mCopyBitDraw(false),
564 ALOGE("FATAL ERROR: copybit open failed.");
567 ALOGE("FATAL ERROR: copybit hw module not found");
571 CopyBit::~CopyBit()