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

Unified Diff: ui/gfx/canvas_paint_gtk.h

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/canvas_paint_gtk.h
diff --git a/ui/gfx/canvas_paint_gtk.h b/ui/gfx/canvas_paint_gtk.h
deleted file mode 100644
index 487db79f47a9e66d03b8ce8bb2ed2f1095c80744..0000000000000000000000000000000000000000
--- a/ui/gfx/canvas_paint_gtk.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_GFX_CANVAS_PAINT_LINUX_H_
-#define UI_GFX_CANVAS_PAINT_LINUX_H_
-
-#include "base/logging.h"
-#include "skia/ext/platform_canvas.h"
-#include "ui/gfx/canvas.h"
-#include <gdk/gdk.h>
-
-namespace gfx {
-
-// A class designed to translate skia painting into a region in a GdkWindow.
-// On construction, it will set up a context for painting into, and on
-// destruction, it will commit it to the GdkWindow.
-// Note: The created context is always inialized to (0, 0, 0, 0).
-class GFX_EXPORT CanvasSkiaPaint : public Canvas {
- public:
- // This constructor assumes the result is opaque.
- explicit CanvasSkiaPaint(GdkEventExpose* event);
- CanvasSkiaPaint(GdkEventExpose* event, bool opaque);
- virtual ~CanvasSkiaPaint();
-
- // Sets whether the bitmap is composited in such a way that the alpha channel
- // is honored. This is only useful if you've enabled an RGBA colormap on the
- // widget. The default is false.
- void set_composite_alpha(bool composite_alpha) {
- composite_alpha_ = composite_alpha;
- }
-
- // Returns true if the invalid region is empty. The caller should call this
- // function to determine if anything needs painting.
- bool is_empty() const {
- return gdk_region_empty(region_);
- }
-
- GdkRectangle rectangle() const {
- GdkRectangle bounds;
- gdk_region_get_clipbox(region_, &bounds);
- return bounds;
- }
-
- private:
- void Init(bool opaque);
-
- cairo_t* context_;
- GdkWindow* window_;
- GdkRegion* region_;
- // See description above setter.
- bool composite_alpha_;
-
- // Disallow copy and assign.
- CanvasSkiaPaint(const CanvasSkiaPaint&);
- CanvasSkiaPaint& operator=(const CanvasSkiaPaint&);
-};
-
-// A class designed to translate skia painting into a region in a Cairo context.
-// On construction, it will set up a context for painting into, and on
-// destruction, it will commit it to the Cairo context. If there are any
-// transformations applied to the Cairo context, they will affect the drawing.
-class GFX_EXPORT CanvasSkiaPaintCairo : public Canvas {
- public:
- CanvasSkiaPaintCairo(cairo_t* cairo, Size size, bool opaque);
- virtual ~CanvasSkiaPaintCairo();
-
- // Sets whether the bitmap is composited in such a way that the alpha channel
- // is honored. This is only useful if you've enabled an RGBA colormap on the
- // widget. The default is false.
- void set_composite_alpha(bool composite_alpha) {
- composite_alpha_ = composite_alpha;
- }
-
- // Returns true if size of the drawing region is empty. The caller should call
- // this function to determine if anything needs painting.
- bool is_empty() const {
- return size_.IsEmpty();
- }
-
- Size size() const {
- return size_;
- }
-
- private:
- void Init(bool opaque);
-
- cairo_t* context_;
- cairo_t* dest_;
- Size size_;
- // See description above setter.
- bool composite_alpha_;
-
- // Disallow copy and assign.
- CanvasSkiaPaintCairo(const CanvasSkiaPaintCairo&);
- CanvasSkiaPaintCairo& operator=(const CanvasSkiaPaintCairo&);
-};
-
-} // namespace gfx
-
-#endif // UI_GFX_CANVAS_PAINT_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698