| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GTK_CAIRO_CACHED_SURFACE_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_CAIRO_CACHED_SURFACE_H_ |
| 6 #define CHROME_BROWSER_GTK_CAIRO_CACHED_SURFACE_H_ | 6 #define CHROME_BROWSER_UI_GTK_CAIRO_CACHED_SURFACE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 typedef struct _GdkPixbuf GdkPixbuf; | 9 typedef struct _GdkPixbuf GdkPixbuf; |
| 10 typedef struct _cairo cairo_t; | 10 typedef struct _cairo cairo_t; |
| 11 typedef struct _cairo_surface cairo_surface_t; | 11 typedef struct _cairo_surface cairo_surface_t; |
| 12 | 12 |
| 13 // A helper class that takes a GdkPixbuf* and renders it to the screen. Unlike | 13 // A helper class that takes a GdkPixbuf* and renders it to the screen. Unlike |
| 14 // gdk_cairo_set_source_pixbuf(), CairoCachedSurface assumes that the pixbuf is | 14 // gdk_cairo_set_source_pixbuf(), CairoCachedSurface assumes that the pixbuf is |
| 15 // immutable after UsePixbuf() is called and can be sent to the X server | 15 // immutable after UsePixbuf() is called and can be sent to the X server |
| 16 // once. From then on, that cached version is used so we don't upload the same | 16 // once. From then on, that cached version is used so we don't upload the same |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 // The source pixbuf. | 52 // The source pixbuf. |
| 53 GdkPixbuf* pixbuf_; | 53 GdkPixbuf* pixbuf_; |
| 54 | 54 |
| 55 // Our cached surface. This should be a xlib surface so the data lives on the | 55 // Our cached surface. This should be a xlib surface so the data lives on the |
| 56 // server instead of on the client. | 56 // server instead of on the client. |
| 57 cairo_surface_t* surface_; | 57 cairo_surface_t* surface_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 #endif // CHROME_BROWSER_GTK_CAIRO_CACHED_SURFACE_H_ | 60 #endif // CHROME_BROWSER_UI_GTK_CAIRO_CACHED_SURFACE_H_ |
| OLD | NEW |