summaryrefslogtreecommitdiffstats
path: root/base/gfx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the PlatformContext layer to have only one class.brettw@chromium.org2009-06-142-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
* Liberalize the size limits in the PNG decoder to match the changes landed ↵pkasting@chromium.org2009-06-091-5/+7
| | | | | | | | | | upstream to all the WebKit image decoders. I'm not sure where this is used, hence no test. BUG=3643 TEST=none Review URL: http://codereview.chromium.org/118462 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17988 0039d316-1c4b-4281-b951-d872f2087c98
* A new menu system for views.ben@chromium.org2009-06-081-0/+3
| | | | | | | | This is all the functionality needed for the page, app menus and browser system menus. Review URL: http://codereview.chromium.org/119237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17895 0039d316-1c4b-4281-b951-d872f2087c98
* Re-Retry. This is the change from hell.glen@chromium.org2009-06-061-5/+34
| | | | | | | | | | | | | | | | | | | | | | | Revert DCHECKs to what they used to be - turns out a bunch of stuff in the code depended on input.empty() == true. --- I believe the code (with your width() * bbp fix) is correct. The UMR errors occur when the source image contain alpha. I believe the issue comes from webkit glue image decoder, and the reason this only started triggering valgrind errors is that the old ones were masked by the change detailed in bug 12640 Also adds valgrind suppression for the new code. TBR=Nick BUG=12891,12640 TEST=none Review URL: http://codereview.chromium.org/119271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17811 0039d316-1c4b-4281-b951-d872f2087c98
* Revert pngencoder changes.glen@chromium.org2009-06-051-36/+5
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17803 0039d316-1c4b-4281-b951-d872f2087c98
* Fix pngencoder mac perf errors - the previous code was never actually doing ↵glen@chromium.org2009-06-051-4/+3
| | | | | | | | | | | | an input.empty() check. BUG=none TEST=none TBR=nick Review URL: http://codereview.chromium.org/118343 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17801 0039d316-1c4b-4281-b951-d872f2087c98
* Retry. I believe the code (with your width() * bbp fix) is correct.glen@chromium.org2009-06-051-5/+37
| | | | | | | | | | | | | The UMR errors occur when the source image contain alpha. I believe the issue comes from webkit glue image decoder, and the reason this only started triggering valgrind errors is that the old ones were masked by the change detailed in bug 12640 Also adds valgrind suppression for the new code. BUG=12891,12640 TEST=none Review URL: http://codereview.chromium.org/118297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17792 0039d316-1c4b-4281-b951-d872f2087c98
* Revert png encoder changes.glen@chromium.org2009-06-041-40/+4
| | | | | | | | | BUG=none TEST=none TBR=nick git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17688 0039d316-1c4b-4281-b951-d872f2087c98
* Twiddle some bits to get PNGEncoder to match ImageOperations. There's a ↵glen@chromium.org2009-06-041-9/+16
| | | | | | | | | | | Valgrind error that doesn't yet make sense. BUG=none TEST=none TBR=willchan git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17680 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to fix memory leak again.glen@chromium.org2009-06-041-1/+1
| | | | | | | | | BUG=none TEST=none TBR=willchan git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17635 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage by defining NativeCursor on Mac.ben@chromium.org2009-06-041-0/+1
| | | | | | | | | TBR=glen BUG=none TEST=none Review URL: http://codereview.chromium.org/118223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17618 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HCURSOR usage in views::View with a new gfx::NativeCursor type that ↵ben@chromium.org2009-06-041-0/+3
| | | | | | | | | | | | | also supports GdkCursor*, and wires this up with the existing implementors of the GetCursorForPoint method. This allows us to get rid of one of the most annoying NOTIMPLEMENTED()s in views-gtk. BUG=none TEST=none Review URL: http://codereview.chromium.org/119150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17614 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in PNGEncoder.glen@chromium.org2009-06-041-10/+10
| | | | | | | | | | | R=willchan BUG=none TEST=none Review URL: http://codereview.chromium.org/119147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17603 0039d316-1c4b-4281-b951-d872f2087c98
* PNGEncoder wasn't accounting for SkBitmap's premultiplied alpha (PNGDecoder ↵glen@chromium.org2009-06-041-4/+33
| | | | | | | | | | was, however). BUG=12891 Review URL: http://codereview.chromium.org/118106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17590 0039d316-1c4b-4281-b951-d872f2087c98
* Merge app/gfx/gtk_util into base/gfx/gtk_util.thestig@google.com2009-06-032-0/+37
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/118174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17535 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak in corrupt JPEG decoding.thestig@chromium.org2009-05-191-2/+2
| | | | | | | BUG=10945 Review URL: http://codereview.chromium.org/113433 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16352 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Take download shelf and infobar close animations into account during ↵estade@chromium.org2009-05-151-3/+3
| | | | | | | | | | render view sizing. http://crbug.com/11080 Review URL: http://codereview.chromium.org/113322 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16193 0039d316-1c4b-4281-b951-d872f2087c98
* This CL updates chrome to the latest version of skia, retrieved via DEPS, andsenorblanco@chromium.org2009-05-135-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | placed in third_party. All relevant skia changes (for all 3 platforms) have been upstreamed. Most of this CL is mind-numbingly repetitive. Things of interest are: skia.gyp (now points at third_party versions), DEPS, and SkUserConfig.h. stdint.h: Skia now requires C99 integer types, which MSVC doesn't support natively. I have put typedefs in config/win/stdint.h. Note that the new version of skia appears to render rects whose coordinates are "backwards" (ie., x2 < x1 or y2 < y1), which were formerly culled. There were a couple obvious instances of this in the code which I fixed, but there may be more. There were ~35 layout test failures due to minor pixel differences which I rebaselined on Windows and Linux, and 8 genuine failures related to masks and stroked text, which I have put in text_expectations.txt and assigned to myself. (There was another change which broke ~1700 tests on each platform, but I put that change behind an #ifdef for now). R=brettw Review URL: http://codereview.chromium.org/65012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15949 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bit from a bunch of files that shouldn't have it.evan@chromium.org2009-05-118-0/+0
| | | | | | | | | | (No code change.) git ls-tree -r HEAD | grep '^100755' | cut -f2 | egrep '\.(png|txt|mm|cc|h|checksum|asm|js|html|c|css|xml|grd|json)$' | xargs chmod a-x git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15809 0039d316-1c4b-4281-b951-d872f2087c98
* More linux ifdef tweaks. This reverts my earlier change (13503).sky@chromium.org2009-04-272-7/+7
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/100046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14628 0039d316-1c4b-4281-b951-d872f2087c98
* Change Size::IsEmpty() to be consistent with Rect::IsEmpty()erikkay@google.com2009-04-265-23/+46
| | | | | | | | | | | Change Size to not accept negative dimensions to be consistent with Rect. BUG=10992 TEST=base_unittests.exe --gtest_filter=RectTest.IsEmpty Review URL: http://codereview.chromium.org/93131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14567 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: unit tests fix.agl@chromium.org2009-04-241-0/+4
| | | | | | | | The unit tests will try and create a RenderViewHost with a NULL widget. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14406 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: use opaque NativeViewIdsagl@chromium.org2009-04-244-10/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we are still passing GtkWidget* into the renderer and trusting the value on the way out. With this patch we switch to using opaque values. These opaque values are handled by a GtkNativeViewIdManger, a singleton object which maintains the list of currently valid ids and their current X window ids. We don't pass the X window ids directly to the renderer because they are a) guessable and b) possibly variable for a GtkWidget. From a patch size point of view, the X window isn't current created at the point where we need it so significant work would be needed to reorder operations to fix that as well. This patch also removes the GTK accesses from the BACKGROUND_X11 thread which were a temporary hack. http://codereview.chromium.org/92110 BUG=9014,9869,10787 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14405 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a leak when we fail to load a gdkpixbuf. I meant to do this intc@google.com2009-04-211-0/+24
| | | | | | | | | the last change, but forgot. Review URL: http://codereview.chromium.org/69042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14143 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a circular dependency by making BGRAToRGBA() generic (no pulling ↵sgk@google.com2009-04-212-25/+0
| | | | | | | | in guchar from gtk.h) and moving it from base/gfx to base. Review URL: http://codereview.chromium.org/87016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14117 0039d316-1c4b-4281-b951-d872f2087c98
* Hide the Fullscreen exit bubble if the mouse goes idle. It took a ↵pkasting@chromium.org2009-04-202-0/+7
| | | | | | | | | | | depressing amount of time for me to think my way through this algorithm :( Along the way I added an operator=() to convert from POINT to gfx::Point() since doing explicit temp conversion for a case like this annoys me. BUG=10568 Review URL: http://codereview.chromium.org/67265 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14031 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing include needed for malloc.thestig@chromium.org2009-04-161-0/+1
| | | | | | | | Patch by Craig Schlenter <craig.schlenter@gmail.com> Review URL: http://codereview.chromium.org/67228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13864 0039d316-1c4b-4281-b951-d872f2087c98
* Recommit previous change with GYP files fixed.erg@google.com2009-04-162-68/+0
| | | | | | | | | | | | | Implement BookmarkContextMenuGtk and hook it up to most bookmark bar elements. Also: - Fixes window dispositions (shift-click works on bookmark bar items). - Reorganizes gtk_utils Original Review URL: http://codereview.chromium.org/76002 Review URL: http://codereview.chromium.org/67223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13857 0039d316-1c4b-4281-b951-d872f2087c98
* Have ResourceBundle own GdkPixbufs.tc@google.com2009-04-161-2/+0
| | | | | | | | | | | | | | | | | This is the same as how ResourceBundle owns the SkBitmaps it loads. This should be faster than before because ResourceBundle will only load each bitmap once and cache the image. Also fix a memory leak in GdkPixbufFromSkBitmap. valgrind says we're not leaking here. BUG=9988 Review URL: http://codereview.chromium.org/67179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13847 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts the previous two commits. (r13812 and r13811).erg@google.com2009-04-152-0/+70
| | | | | | Review URL: http://codereview.chromium.org/75023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13813 0039d316-1c4b-4281-b951-d872f2087c98
* Implement BookmarkContextMenuGtk and hook it up to most bookmark bar elements.erg@google.com2009-04-152-70/+0
| | | | | | | | | | Also: - Fixes window dispositions (shift-click works on bookmark bar items). - Reorganizes gtk_utils Review URL: http://codereview.chromium.org/76002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13811 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some ifdefs so that test_shell can be compiled on linuxsky@chromium.org2009-04-102-11/+9
| | | | | | | | | | | | | without GTK. I had to recreate this patch as my workspace for various resonds. UGH! BUG=none TEST=none Review URL: http://codereview.chromium.org/67024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13503 0039d316-1c4b-4281-b951-d872f2087c98
* Include correct header for uint8_t in gtk_util.hevan@chromium.org2009-04-071-0/+1
| | | | | | | Review URL: http://codereview.chromium.org/63065 Patch from Craig Schlenter <craig.schlenter@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13272 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: store clipboard image as bmp rather than converting to PNG.estade@chromium.org2009-04-072-13/+27
| | | | | | Review URL: http://codereview.chromium.org/63040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13218 0039d316-1c4b-4281-b951-d872f2087c98
* Basic infobars on linux.estade@chromium.org2009-04-062-0/+16
| | | | | | | | All infobars consist of nothing but a non-functioning close button. Review URL: http://codereview.chromium.org/62070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13206 0039d316-1c4b-4281-b951-d872f2087c98
* Put a border around the find bar text entry field.estade@chromium.org2009-04-032-1/+3
| | | | | | Review URL: http://codereview.chromium.org/56207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13091 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the checked-in scons configuration files.sgk@google.com2009-04-011-15/+0
| | | | | | Review URL: http://codereview.chromium.org/53121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12982 0039d316-1c4b-4281-b951-d872f2087c98
* Linux UI theming:estade@chromium.org2009-03-252-2/+8
| | | | | | | | | - Improve appearance of menus by setting background to white (matching windows and fitting better with the overall appearance). - Disable user theming of native widgets: since our widgets are a hodge-podge of native and custom-drawn, there's no way we can support user theming. Eventually users will be able to choose a theme for chromium; until then make everything look like chrome. Review URL: http://codereview.chromium.org/49035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12516 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium side of trackbar drawing. This is needed to support <input ↵pkasting@chromium.org2009-03-202-20/+126
| | | | | | | | | | | type="range">. This code will not be called until I land the upstream hooks to RenderThemeChromiumWin.cpp to use it. BUG=8931 Review URL: http://codereview.chromium.org/42451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12231 0039d316-1c4b-4281-b951-d872f2087c98
* Reorder some stuff to be in alphabetical order in preparation for adding ↵pkasting@chromium.org2009-03-192-246/+246
| | | | | | | | more. No functional change. Review URL: http://codereview.chromium.org/42418 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12164 0039d316-1c4b-4281-b951-d872f2087c98
* Basic windowless plugins, try 2.evan@chromium.org2009-03-131-3/+2
| | | | | | | | | | | In response to Dean's comment on http://codereview.chromium.org/39105, I redid that patch to put the X munging into the plugin implementation. This won't work for multiproc, but it's near the correct place and many things will need to be changed for multiproc. Review URL: http://codereview.chromium.org/42056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11674 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the look of the Linux omnibox.deanm@chromium.org2009-03-132-0/+22
| | | | | | | | | | | | | | | | - Paint a border around the input widget, which makes it fit better into the toolbar. A bordered widget is also very nice to have for debugging, so I abstracted a small helper for making a bordered bin. - Improve the results popup by painting with some Pango attributes. Sort of looks awful over NX, but I'm hoping it looks better on a real session. BUG=8236 Review URL: http://codereview.chromium.org/46035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11644 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Add a GDK_COLOR_RGB macro for constructing GdkColors.deanm@chromium.org2009-03-121-0/+5
| | | | | | | | | This does the simple math of * 257 to map from a 1 byte component to the gint16 GdkColor values, and initializes the pixel field to 0. Review URL: http://codereview.chromium.org/43077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11526 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-1018-18/+0
| | | | | | | | | Normalize end of file newlines in base/. All files end in a single newline. Review URL: http://codereview.chromium.org/42011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
* Move GdkPixbufFromSkBitmap to gtk_util so it can easily be shared.deanm@chromium.org2009-03-102-0/+45
| | | | | | | Review URL: http://codereview.chromium.org/38009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11327 0039d316-1c4b-4281-b951-d872f2087c98
* Expose the iostream (logging) interfaces of some gfx:: classes.evan@chromium.org2009-03-043-17/+3
| | | | | | | | | This is useful when developing anyway, and the compiler ought to be able to eliminate any dead code if we don't use it. Review URL: http://codereview.chromium.org/39089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10926 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE (except one global std::wstring changed to const wchar_t* ↵maruel@chromium.org2009-03-035-15/+26
| | | | | | | | | | | const per style compliance). Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
* Start stitching GYP-generated files into the Linux build:sgk@google.com2009-03-031-95/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a GYP=1 command-line variable to use the gyp-generated files (which are generated side-by-side until everything's okay enough to cut over for real). * Rearrange existing *.scons files to match the layout of the gyp-generated ones, so the transition will be easier: * base.scons (the wrapping logic that calls the other *.scons files) => base_sln.scons * base_lib.scons (the library itself) => base.scons (matching the gyp target generation) * gfx/base_gfx.scons => base_gfx.scons (with necessary prepending of "gfx/" to path names) build/SConscript.main fixes: * Use an internal ${_GYP} infix variable to select the right flavor of *.scons file (multiple places) * When building with GYP=1, only load the one component *_sln_gyp.scons file, because gyp has already created it with knowledge of all the right dependent *_gyp.scons files to load. Linux gyp build fixes: * Add -32 to $ASFLAGS for generating a 32-bit libicudata.a from the now-checked in .s. * Add -Wno-unused and -Wno-unused-function to skia. Review URL: http://codereview.chromium.org/28207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10759 0039d316-1c4b-4281-b951-d872f2087c98
* Allow inclusion of libpng in the deps file.brettw@chromium.org2009-02-251-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10349 0039d316-1c4b-4281-b951-d872f2087c98