/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you 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 . */ #include #include #include #include #include #include "spritedevicehelper.hxx" #include "spritecanvas.hxx" #include "spritecanvashelper.hxx" #include "canvasbitmap.hxx" using namespace ::com::sun::star; namespace vclcanvas { SpriteDeviceHelper::SpriteDeviceHelper() : mpBackBuffer() { } void SpriteDeviceHelper::init( const OutDevProviderSharedPtr& pOutDev ) { DeviceHelper::init(pOutDev); // setup back buffer OutputDevice& rOutDev( pOutDev->getOutDev() ); mpBackBuffer.reset( new BackBuffer( rOutDev )); mpBackBuffer->setSize( rOutDev.GetOutputSizePixel() ); // #i95645# #if defined( QUARTZ ) // use AA on VCLCanvas for Mac mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpBackBuffer->getOutDev().GetAntialiasing() ); #else // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); #endif } ::sal_Int32 SpriteDeviceHelper::createBuffers( ::sal_Int32 nBuffers ) { (void)nBuffers; // TODO(F3): implement XBufferStrategy interface. For now, we // _always_ will have exactly one backbuffer return 1; } void SpriteDeviceHelper::destroyBuffers() { // TODO(F3): implement XBufferStrategy interface. For now, we // _always_ will have exactly one backbuffer } ::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool ) { OSL_FAIL("Not supposed to be called, handled by SpriteCanvas"); return sal_False; } ::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool ) { OSL_FAIL("Not supposed to be called, handled by SpriteCanvas"); return sal_False; } void SpriteDeviceHelper::disposing() { // release all references mpBackBuffer.reset(); DeviceHelper::disposing(); } uno::Any SpriteDeviceHelper::isAccelerated() const { return DeviceHelper::isAccelerated(); } uno::Any SpriteDeviceHelper::getDeviceHandle() const { return DeviceHelper::getDeviceHandle(); } uno::Any SpriteDeviceHelper::getSurfaceHandle() const { if( !mpBackBuffer ) return uno::Any(); return uno::makeAny( reinterpret_cast< sal_Int64 >(&mpBackBuffer->getOutDev()) ); } void SpriteDeviceHelper::notifySizeUpdate( const awt::Rectangle& rBounds ) { if( mpBackBuffer ) mpBackBuffer->setSize( ::Size(rBounds.Width, rBounds.Height) ); } void SpriteDeviceHelper::dumpScreenContent() const { DeviceHelper::dumpScreenContent(); static sal_Int32 nFilePostfixCount(0); if( mpBackBuffer ) { rtl::OUString aFilename("dbg_backbuffer"); aFilename += rtl::OUString::valueOf(nFilePostfixCount); aFilename += rtl::OUString(".bmp"); SvFileStream aStream( aFilename, STREAM_STD_READWRITE ); const ::Point aEmptyPoint; mpBackBuffer->getOutDev().EnableMapMode( sal_False ); aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()); } ++nFilePostfixCount; } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
d=aedaee97a7e4ae9b0c00163c5767ae6ebc937ead&showmsg=1'>openfiledroptargetlistener.hxx
AgeCommit message (Expand)Author
AgeCommit message (Collapse)Author
2017-04-10loplugin:inlinefields in OpenFileDropTargetListenerNoel Grandin
Change-Id: Ib1f7004ce57f144309d396bc71419f3d1036ff74 Reviewed-on: https://gerrit.libreoffice.org/36353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-04tdf#88206 replace cppu::WeakImplHelper* in svtools and svxJochen Nitschke
and remove unused implbase*.hxx and compbase*.hxx includes Change-Id: Iedf6b6dce09b5baf714a1b3394bb7fb3526cca82 Reviewed-on: https://gerrit.libreoffice.org/31594 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2015-10-23com::sun::star->css in include/sot to include/typelibNoel Grandin
Change-Id: I9cd92b53370a6b6018d2f7c648890f9c014a27de
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274