Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp

Issue 13724012: Remove Cairo support. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 2 Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
35 void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& t argetRect, const IntPoint& sourceOffset, int bytesPerLine, UpdateContentsFlag) 35 void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& t argetRect, const IntPoint& sourceOffset, int bytesPerLine, UpdateContentsFlag)
36 { 36 {
37 #if PLATFORM(QT) 37 #if PLATFORM(QT)
38 QImage image(reinterpret_cast<const uchar*>(data), targetRect.width(), targe tRect.height(), bytesPerLine, NativeImageQt::defaultFormatForAlphaEnabledImages( )); 38 QImage image(reinterpret_cast<const uchar*>(data), targetRect.width(), targe tRect.height(), bytesPerLine, NativeImageQt::defaultFormatForAlphaEnabledImages( ));
39 39
40 QPainter* painter = m_image->context()->platformContext(); 40 QPainter* painter = m_image->context()->platformContext();
41 painter->save(); 41 painter->save();
42 painter->setCompositionMode(QPainter::CompositionMode_Source); 42 painter->setCompositionMode(QPainter::CompositionMode_Source);
43 painter->drawImage(targetRect, image, IntRect(sourceOffset, targetRect.size( ))); 43 painter->drawImage(targetRect, image, IntRect(sourceOffset, targetRect.size( )));
44 painter->restore(); 44 painter->restore();
45 #elif PLATFORM(CAIRO)
46 RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create_for_da ta(static_cast<unsigned char*>(data()),
47 CAIRO_FORMAT_ARGB32,
48 targetRect.width(), targetRect.height(),
49 bytesPerLine));
50 m_image->context()->platformContext()->drawSurfaceToContext(surface.get(), t argetRect,
51 IntRect(sourceOf fset, targetRect.size()), m_image->context());
52 #else 45 #else
53 UNUSED_PARAM(data); 46 UNUSED_PARAM(data);
54 UNUSED_PARAM(targetRect); 47 UNUSED_PARAM(targetRect);
55 UNUSED_PARAM(sourceOffset); 48 UNUSED_PARAM(sourceOffset);
56 UNUSED_PARAM(bytesPerLine); 49 UNUSED_PARAM(bytesPerLine);
57 #endif 50 #endif
58 } 51 }
59 52
60 void BitmapTextureImageBuffer::updateContents(TextureMapper*, GraphicsLayer* sou rceLayer, const IntRect& targetRect, const IntPoint& sourceOffset, UpdateContent sFlag) 53 void BitmapTextureImageBuffer::updateContents(TextureMapper*, GraphicsLayer* sou rceLayer, const IntRect& targetRect, const IntPoint& sourceOffset, UpdateContent sFlag)
61 { 54 {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 157
165 #if ENABLE(CSS_FILTERS) 158 #if ENABLE(CSS_FILTERS)
166 PassRefPtr<BitmapTexture> BitmapTextureImageBuffer::applyFilters(TextureMapper*, const BitmapTexture&, const FilterOperations&) 159 PassRefPtr<BitmapTexture> BitmapTextureImageBuffer::applyFilters(TextureMapper*, const BitmapTexture&, const FilterOperations&)
167 { 160 {
168 return this; 161 return this;
169 } 162 }
170 #endif 163 #endif
171 164
172 } 165 }
173 #endif 166 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698