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

Issue 8769017: GTK: Move CairoCachedSurface from being owned by GtkThemeService to gfx::Image. (Closed)

Created:
9 years ago by Elliot Glaysher
Modified:
9 years ago
Reviewers:
Robert Sesek, Ben
CC:
chromium-reviews, Paweł Hajdan Jr.
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

GTK: Move CairoCachedSurface from being owned by GtkThemeService to gfx::Image. CairoCachedSurfaces are representations of a GdkPixbuf that live on the display server instead of in process. GtkThemeService currently returns a CairoCachedSurface for a (IDR#, Display). Instead, make gfx::Image keep CairoCachedSurfaces as a representation and make CairoCachedSurface work on any display, keeping the mapping to display server resources as an implementation detail. This has the benefit of: - You don't need to go through GtkThemeService to access all resources, simplifying the code in some places and allowing sharing of static images across profiles. - This will let us (in the future) remove several image conversions in the GTK port. This is part 1. Part 2 will remove the custom CairoCachedSurface calls from GtkThemeService. BUG=106060 TEST=none R=rsesek@chromium.org TBR=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112778

Patch Set 1 #

Total comments: 9

Patch Set 2 : rsesek nits #

Patch Set 3 : comment for rsesek #

Patch Set 4 : Oops. Fix representation. #

Total comments: 1

Patch Set 5 : Rebase for commit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -288 lines) Patch
M chrome/browser/ui/gtk/about_chrome_dialog.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_toolbar_gtk.cc View 1 2 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 3 4 12 chunks +28 lines, -24 lines 0 comments Download
D chrome/browser/ui/gtk/cairo_cached_surface.h View 1 chunk +0 lines, -70 lines 0 comments Download
D chrome/browser/ui/gtk/cairo_cached_surface.cc View 1 chunk +0 lines, -93 lines 0 comments Download
M chrome/browser/ui/gtk/custom_button.h View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/gtk/custom_button.cc View 1 2 3 4 6 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/gtk/find_bar_gtk.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_theme_service.h View 4 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_theme_service.cc View 8 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_util.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc View 13 chunks +26 lines, -24 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
A + ui/gfx/image/cairo_cached_surface.h View 3 chunks +28 lines, -13 lines 0 comments Download
A ui/gfx/image/cairo_cached_surface.cc View 1 chunk +109 lines, -0 lines 0 comments Download
M ui/gfx/image/image.h View 1 3 chunks +6 lines, -0 lines 0 comments Download
M ui/gfx/image/image.cc View 1 2 3 4 8 chunks +52 lines, -2 lines 0 comments Download
M ui/gfx/image/image_unittest.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Elliot Glaysher
rsesek: gfx::Image additions estade: touchups to ui/gtk/ callsites. (More coming to move lots of stuff ...
9 years ago (2011-12-01 19:03:38 UTC) #1
Robert Sesek
http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc#newcode47 ui/gfx/image/image.cc:47: class ImageRepCairoCached; nit: put below ImageRepGdk http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc#newcode165 ui/gfx/image/image.cc:165: nit: ...
9 years ago (2011-12-01 19:30:35 UTC) #2
Elliot Glaysher
nits addressed http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc#newcode374 ui/gfx/image/image.cc:374: } On 2011/12/01 19:30:35, rsesek wrote: > ...
9 years ago (2011-12-01 20:30:11 UTC) #3
Robert Sesek
gfx/image/ lgtm http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/8769017/diff/1/ui/gfx/image/image.cc#newcode374 ui/gfx/image/image.cc:374: } On 2011/12/01 20:30:11, Elliot Glaysher wrote: ...
9 years ago (2011-12-01 20:56:14 UTC) #4
Elliot Glaysher
rsesek: PTAL. I had to make some minor changes to Image because what I was ...
9 years ago (2011-12-02 01:21:03 UTC) #5
Evan Stade
lgtm
9 years ago (2011-12-02 02:30:52 UTC) #6
Robert Sesek
http://codereview.chromium.org/8769017/diff/2005/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/8769017/diff/2005/ui/gfx/image/image.cc#newcode390 ui/gfx/image/image.cc:390: else if (rep_type == Image::kImageRepCairoCache) { // Handle to-Cairo ...
9 years ago (2011-12-02 16:36:16 UTC) #7
Robert Sesek
lgtm
9 years ago (2011-12-02 16:36:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/8769017/52
9 years ago (2011-12-02 19:05:18 UTC) #9
commit-bot: I haz the power
Presubmit check for 8769017-52 failed and returned exit status 1. Running presubmit commit checks ...
9 years ago (2011-12-02 19:05:27 UTC) #10
Elliot Glaysher
tbr: ben (rsesek wrote all the code in that directory and I have his lgtm ...
9 years ago (2011-12-02 19:14:51 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/8769017/52
9 years ago (2011-12-02 19:15:15 UTC) #12
commit-bot: I haz the power
9 years ago (2011-12-02 20:54:21 UTC) #13
Change committed as 112778

Powered by Google App Engine
This is Rietveld 408576698