summaryrefslogtreecommitdiffstats
path: root/ui/gfx
Commit message (Collapse)AuthorAgeFilesLines
* Make the CROS browser size itself to the MonitorWorkAreaNearestWindow again,danakj@chromium.org2011-10-041-46/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but fix the WorkArea's dimensions to be sane. CL http://codereview.chromium.org/8060016/ changed the CROS browser size to be the MonitorArea, to match the size chosen for the CROS container window. However, sky@ has taken issue with this approach, as this changes the browser window's behavior and may have unexpected consequences down the road when this change is long forgotten. Thus changing back to use the MonitorWorkArea*. However, the MonitorWorkArea is supposed to be a working space on a single monitor. What was being returned was one of 1) The root window dimensions (covers all monitors) 2) The _NET_WORK_AREA, a rect set by the WM that likely covers all monitors (though this is not specified) A rect that covers all monitors is bad as this is always >= the rect given by MonitorArea - the size of the container window - and we get a browser window that is bigger than its container. There is lots of room for multihead here, and that will come in time, this does not attempt to address anything of the sort. We just make MonitorWorkArea() return the same rect as MonitorArea(). This matches all other OS/Toolkit implementations, where the idea of _NET_WORK_AREA does not exist. This does change a few things, which used WorkArea, which may seem odd in a single monitor case, - views/widget/native_widget_gtk.cc:997: This will center on the monitor now instead of on the space inside the user's panels (if this change is noticable at all). However, this also means it will center on a single monitor now in a dual-head environment rather than across them which is a rather bad default behaviour. This is a shortcoming of the spec, and outside of what _NET_WORK_AREA was meant to provide, so we should determine this area on our own if we want it to differ from the monitor's physical area. R=sky,oshima BUG= TEST= Review URL: http://codereview.chromium.org/8070009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103895 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes the cursor to update reliably when moving from window to window.ben@chromium.org2011-10-041-0/+2
| | | | | | | | http://crbug.com/98337 TEST=none Review URL: http://codereview.chromium.org/8122008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103882 0039d316-1c4b-4281-b951-d872f2087c98
* Reland the layer creation change since the touchui issues will be resolved ↵sadrul@chromium.org2011-10-032-0/+13
| | | | | | | | | | | | in a follow up CL. This reverts 103580 - Revert the layer creation change r103338 due to some issues with the keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8115010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103777 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a minor bug in NativeThemeWin::PaintToNonPlatformCanvas(), which is ↵alokp@chromium.org2011-10-031-3/+13
| | | | | | | | used by accelerated drawing path. Some of the member variables of ExtraParams were not being set correctly. Review URL: http://codereview.chromium.org/8059018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103761 0039d316-1c4b-4281-b951-d872f2087c98
* Fix selection handler position in touch.xji@google.com2011-10-032-18/+18
| | | | | | | | BUG=90426 TEST=compile with touch, try selection in bidi text. run views_unittests --gtest_filter=TouchSelectionControllerImplTest.* Review URL: http://codereview.chromium.org/8095002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103755 0039d316-1c4b-4281-b951-d872f2087c98
* Makes layer_unittests run on linuxpkotwicz@chromium.org2011-10-033-26/+58
| | | | | | | | Added test_compositor_host_linux implementation for linux. Review URL: http://codereview.chromium.org/8060047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103730 0039d316-1c4b-4281-b951-d872f2087c98
* Revert the layer creation change r103338 due to some issues with the ↵ben@chromium.org2011-09-302-13/+0
| | | | | | | | keyboard on touch. I'll re-land later once I can get a working linux build.TBR=skyBUG=noneTEST=none Review URL: http://codereview.chromium.org/8100015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103580 0039d316-1c4b-4281-b951-d872f2087c98
* gcc 4.6 warnings cleanuppph34r@gmail.com2011-09-301-1/+2
| | | | | | | | | | BUG=87490 TEST=compile with gcc 4.6 Review URL: http://codereview.chromium.org/8050008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103513 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new method to Layer that schedules a redraw in the compositor.Rename ↵ben@chromium.org2011-09-307-14/+20
| | | | | | | | Compositor::SchedulePaint to Compositor::ScheduleDraw and CompositorDelegate::ScheduleCompositorPaint to CompositorDelegate::ScheduleDraw.BUG=noneTEST=none Review URL: http://codereview.chromium.org/8083028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103502 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage again. This time with correct ifdefs.ben@chromium.org2011-09-301-9/+10
| | | | | | | | | TBR=saintlou BUG=none TEST=none Review URL: http://codereview.chromium.org/8103002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 103483 - Fix windows Aura bustage.TBR=saintlouBUG=noneTEST=noneReview ↵ben@chromium.org2011-09-301-11/+9
| | | | | | | | URL: http://codereview.chromium.org/8098004TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8101002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103484 0039d316-1c4b-4281-b951-d872f2087c98
* Fix windows Aura bustage.TBR=saintlouBUG=noneTEST=noneben@chromium.org2011-09-301-9/+11
| | | | | | Review URL: http://codereview.chromium.org/8098004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103483 0039d316-1c4b-4281-b951-d872f2087c98
* More aura build fixesdavemoore@chromium.org2011-09-301-0/+36
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/8094001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103473 0039d316-1c4b-4281-b951-d872f2087c98
* Changed assertion about current OpenGL context to work in the face ofkbr@chromium.org2011-09-295-5/+20
| | | | | | | | | | third-party libraries using OpenGL. BUG=98491 TEST=ran G+ hangout (no assertion failure, but crashed for other reasons), WebGL demos Review URL: http://codereview.chromium.org/8081004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103357 0039d316-1c4b-4281-b951-d872f2087c98
* Construct a View's layer immediately when SetPaintToLayer(true) is called or ↵ben@chromium.org2011-09-292-0/+13
| | | | | | | | when a transform is set.This eliminates the need for LayerHelper since it basically just served as a middle-man for caching layer state when a layer did not exist (which occurred when a view was invisible or not part of a view hierarchy).Also includes a fix to reorder layer children properly without crashing due to dropped textures.BUG=noneTEST=existing unittests Review URL: http://codereview.chromium.org/8054023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103338 0039d316-1c4b-4281-b951-d872f2087c98
* Setting fills bounds opaquely as the default.pkotwicz@chromium.org2011-09-291-2/+2
| | | | | | | | | | | | | Computes set fills bounds opaquely inside widget based on transparency value Depends on 7976040 for correctness BUG=None TEST=None Review URL: http://codereview.chromium.org/8038047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103322 0039d316-1c4b-4281-b951-d872f2087c98
* In views desktop, it is possible for child layers to intersect. (This ↵pkotwicz@chromium.org2011-09-292-66/+110
| | | | | | | | | | situation occurs when the omnibox is open) Refactored logic for hole such that the hole does not overlap immediate child layers which cannot have a hole. Review URL: http://codereview.chromium.org/7976040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103305 0039d316-1c4b-4281-b951-d872f2087c98
* Add virtual to ~Layer to appease clang.sky@chromium.org2011-09-291-1/+1
| | | | | | | | | | | R=ben@chromium.org BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8082002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103284 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the ability to set an Animation on Layer so that future changes to the ↵sky@chromium.org2011-09-296-180/+333
| | | | | | | | | | | layer result in animating the property. See code in desktop_window_view.cc and window.cc for usage. BUG=none TEST=none Review URL: http://codereview.chromium.org/7972023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103282 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors TestCompositor out of views_unittests into a place it can besky@chromium.org2011-09-288-18/+282
| | | | | | | | | | | | | | used by both the layer tests and the views test. Also fixes a bug that was causing test to fail and fixes up defines. I've disabled a portion of the compositor unit tests on linux as they don't compile. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/8072010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103208 0039d316-1c4b-4281-b951-d872f2087c98
* Fix omnibox state for each tab.xji@google.com2011-09-284-127/+154
| | | | | | | | | | ui::Range only saves cursor's logical positions. In order to restore cursor's visual position, need to save and restore gfx::SelectionModel. BUG=90426 TEST=start chromeos --use-pure-views, type in "abcABC" in omnibox, where "ABC" stands for Hebrew characters. Mouse click on right half of 'c' so that cursor is placed at "abc|CBA". Create a new tab. Click to restore the previous tab page, cursor should be displayed the same as before "abc|CBA", not "abcCBA|". Review URL: http://codereview.chromium.org/7973007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103188 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Add ToString() function to Rect class.tfarina@chromium.org2011-09-282-9/+11
| | | | | | | | | | So we don't need to override operator<< for Rect class. R=sky@chromium.org Review URL: http://codereview.chromium.org/8066006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103158 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Add ToString() function to Size class.tfarina@chromium.org2011-09-273-10/+11
| | | | | | | | | | So we don't need to override operator<< for Size class. R=sky@chromium.org Review URL: http://codereview.chromium.org/8038024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102998 0039d316-1c4b-4281-b951-d872f2087c98
* Allow layers to be created without a compositor, creating this association ↵ben@chromium.org2011-09-276-62/+205
| | | | | | | | when they are associated with a root layer/added to a hierarchy parented to a root layer.This allows us to configure a layer associated with a view before the view is attached to a widget.BUG=noneTEST=unittests Review URL: http://codereview.chromium.org/8036026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102989 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 102978 - Change X11 error handler override to allow easy X11 error ↵dominich@chromium.org2011-09-272-6/+6
| | | | | | | | | | | | | | | checking. BUG=None TEST=None Review URL: http://codereview.chromium.org/7889040 TBR=dominich@chromium.org Review URL: http://codereview.chromium.org/8052015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102985 0039d316-1c4b-4281-b951-d872f2087c98
* Change X11 error handler override to allow easy X11 error checking.dominich@chromium.org2011-09-272-6/+6
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7889040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102978 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes compositor crashpkotwicz@chromium.org2011-09-271-1/+2
| | | | | | | | | | UpdateLayerCanvas does not ensure that a texture exists BUG= TEST= Review URL: http://codereview.chromium.org/8051020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102976 0039d316-1c4b-4281-b951-d872f2087c98
* Implement --use-gl=anyzmo@google.com2011-09-271-1/+11
| | | | | | | | | | | | | | The behavior is this: if --use-gl=any passes in, and the default GL binding causes GPU features to be blacklisted, fallback to osmesa. Also, in GPU process, if the default binding fails, fallback to osmesa. This option will be used in testing to make sure accelerated path is always tested, if not on GPU, then on top of osmesa. This CL also moves certain functions out of GpuBlacklist to GpuDataManager so we could manage the special cases when --use-gl=osmesa or --use-gl=any is passed. BUG=97675 TEST=bots green Review URL: http://codereview.chromium.org/7967020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102973 0039d316-1c4b-4281-b951-d872f2087c98
* Do not allocate a texture if hole covers entire layer.pkotwicz@chromium.org2011-09-273-9/+50
| | | | | | | | | BUG=None TEST= poster circle, at 35FPS on tegra2 hardware Review URL: http://codereview.chromium.org/7976004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102925 0039d316-1c4b-4281-b951-d872f2087c98
* There are two GDI objects leaks related to icon of downloading resources:yosin@chromium.org2011-09-272-12/+69
| | | | | | | | | | | | | | | | | 1. HICON leak from SHGetFileInfo ** Leak in IconLoader 2. HBITMAP leaks from GetIconInfo ** Leak in CreateSkBitmapFromHICON Adding new API CreateSkBitmapFromHICON without size helps removing leaks from IconLoader, InfoBar and Chrome Task Manager. BUG=51616 TEST=Manual on Win7 Review URL: http://codereview.chromium.org/7979036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102886 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Fix Linux shared build by adding missing UI_EXPORT annotations.tfarina@chromium.org2011-09-261-2/+4
| | | | | | | | TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8028029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102765 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Refactor favicon_size.htfarina@chromium.org2011-09-262-17/+29
| | | | | | | | | | | | | | - Put it into a gfx namespace. - Define the constant into the source file instead. - Rename the function from calc_favicon_target_size to CalculateFaviconTargetSize, so it matches with our style guide. - Move the implementation of the function to the source file. R=sky@chromium.org Review URL: http://codereview.chromium.org/8037011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102760 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Add ToString() function to Point class.tfarina@chromium.org2011-09-263-10/+10
| | | | | | | | | | So we don't need to override operator<< for Point class. R=sky@chromium.org Review URL: http://codereview.chromium.org/8044015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102746 0039d316-1c4b-4281-b951-d872f2087c98
* Compile ui/ on Android.zhenghao@google.com2011-09-241-1/+3
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8018011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102660 0039d316-1c4b-4281-b951-d872f2087c98
* Allow animating alphavollick@chromium.org2011-09-236-6/+103
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7979020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102571 0039d316-1c4b-4281-b951-d872f2087c98
* + Renaming some _linux.cc files as _gtk.cc since that is what they really are.saintlou@chromium.org2011-09-232-1/+46
| | | | | | | | | | | | | + Adding _aura.cc stub files. + Fixing a few #ifdef for USE_AURA build. + Adding SkRegion as NativeRegion under Aura & adding ScopedRegion under ui/gfx. BUG=97131 TEST=none Review URL: http://codereview.chromium.org/7970025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102564 0039d316-1c4b-4281-b951-d872f2087c98
* compositor: Add a stub TestCompositorHostLinux implementation.tfarina@chromium.org2011-09-232-2/+49
| | | | | | | | R=sky@chromium.org Review URL: http://codereview.chromium.org/7966027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102549 0039d316-1c4b-4281-b951-d872f2087c98
* Implements OSMesaImageTransportSurface in the GPU for sending GLSurface from ↵wjmaclean@google.com2011-09-232-2/+3
| | | | | | | | | | | | | | the GPU to the browser. Implements AcceleratedSurfaceContainerTouchOSMesa in the browser's renderer for receiving a GLSurface contents and building a GLTexture in the browser for compositing. BUG= TEST=./out/Debug/chrome --use-gl=osmesa --show-fps-counter Review URL: http://codereview.chromium.org/7980006 Patch from Dana Jansens <danakj@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102500 0039d316-1c4b-4281-b951-d872f2087c98
* Fix aura surface buildoshima@google.com2011-09-221-1/+1
| | | | | | | | | | | gtk, wayland and aura+x11 needs this, which can just be use_x11 BUG=none TEST=none Review URL: http://codereview.chromium.org/7969029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102401 0039d316-1c4b-4281-b951-d872f2087c98
* compositor: Fix compositor_unittests build on Linux.tfarina@chromium.org2011-09-223-1/+16
| | | | | | | | | | | | | This makes compositor_unittests compiles on Linux. Although running it doesn't work yet because we return NULL in TestCompositorHost::Create() and it expects something different than NULL. R=sky@chromium.org Review URL: http://codereview.chromium.org/7996005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102391 0039d316-1c4b-4281-b951-d872f2087c98
* Roll skia to 2303bsalomon@google.com2011-09-223-3/+15
| | | | | | Review URL: http://codereview.chromium.org/7977031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102366 0039d316-1c4b-4281-b951-d872f2087c98
* 1. Implement move cursor left/right by word.xji@google.com2011-09-223-10/+263
| | | | | | | | | | | | 2. Fix pango rendering of Arabic joining shapes. In Pango, different font means different runs, and it breaks arabic shaping across run boundaries. Do not reset font attribute if it is the same as default. BUG=90426 TEST=RenderTextTest.MoveLeftRightByWord*. Build chromeos, open it with --use-pure-views, type in تسیک then select the 2nd and 3rd characters, check whether the characters' shapes changes (from joining to not joining). Review URL: http://codereview.chromium.org/7892044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102359 0039d316-1c4b-4281-b951-d872f2087c98
* compositor: Add protected virtual destructor to CompositorDelegate.tfarina@chromium.org2011-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of a protected virtual destructor is to prevent the destruction of a derived object via a base-class pointer. That's it, CompositorDelegate should only be deleted through derived class. Example: class Delegate { public: ... protected: virtual ~Delegate() {} }; class Foo : public Delegate { }; Delegate* delegate = new Foo; delete delegate; // It should prevent this situation! R=sky@chromium.org Review URL: http://codereview.chromium.org/7974010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102350 0039d316-1c4b-4281-b951-d872f2087c98
* Compile gl/ and surface/ on Android.zhenghao@google.com2011-09-215-3/+123
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7981034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102204 0039d316-1c4b-4281-b951-d872f2087c98
* Rename PanelMouseWatcherGtk into PanelMouseWatcherTimer. Added ↵dimich@chromium.org2011-09-211-0/+20
| | | | | | | | implementation of gfx::Point GetCursorScreenPoint() on Mac. Review URL: http://codereview.chromium.org/7981012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102173 0039d316-1c4b-4281-b951-d872f2087c98
* This is a reapply of xji@google.com2011-09-217-114/+442
| | | | | | | | | | | | | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=102006 fix know issues in RenderText 1. add tests. 2. change SelectWord() to use BreakIterator, so it works for Chinese and Complex script. 3. DELETE/ReplaceChar delete/replace a whole grapheme. ReplaceTextInternal should only replace one grapheme when there is no selection. 4. pointing to position outside of text returns HOME/END position. 5. based on Chrome Linux omnibox and gedit, given "abc| def", double click should select " " instead of "abc". Change test expectation. BUG=90426 TEST=compile with touchui=1 test omnibox. run views_unittests.NativeTextfieldViewsTest/TextfieldViewsModelTest Review URL: http://codereview.chromium.org/7841056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102160 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes issues where WGC3D based on OSMesa GL implementation isn't allowing ↵bsalomon@google.com2011-09-212-0/+9
| | | | | | | | | | OES extensions that are supported. TEST=none BUG=none Review URL: http://codereview.chromium.org/7980034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102135 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Make 'ui' buildable without gtk.sadrul@chromium.org2011-09-219-89/+103
| | | | | | | | | BUG=97131 TEST=ui_unittests links and runs with use_aura=1 Review URL: http://codereview.chromium.org/7977025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102131 0039d316-1c4b-4281-b951-d872f2087c98
* Declare native types for Android.zhenghao@google.com2011-09-211-0/+11
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7978008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102059 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 102006 - fix know issues in RenderTextsky@chromium.org2011-09-207-442/+114
| | | | | | | | | | | | | | | | | | 1. add tests. 2. change SelectWord() to use BreakIterator, so it works for Chinese and Complex script. 3. DELETE/ReplaceChar delete/replace a whole grapheme. ReplaceTextInternal should only replace one grapheme when there is no selection. 4. pointing to position outside of text returns HOME/END position. 5. based on Chrome Linux omnibox and gedit, given "abc| def", double click should select " " instead of "abc". Change test expectation. BUG=90426 TEST=compile with touchui=1 test omnibox. run views_unittests.NativeTextfieldViewsTest/TextfieldViewsModelTest Review URL: http://codereview.chromium.org/7841056 TBR=xji@google.com Review URL: http://codereview.chromium.org/7982013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102020 0039d316-1c4b-4281-b951-d872f2087c98