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

Side by Side Diff: skia/ext/canvas_paint_linux.h

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/canvas_paint_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #ifndef SKIA_EXT_CANVAS_PAINT_LINUX_H_ 6 #ifndef SKIA_EXT_CANVAS_PAINT_LINUX_H_
7 #define SKIA_EXT_CANVAS_PAINT_LINUX_H_ 7 #define SKIA_EXT_CANVAS_PAINT_LINUX_H_
8 #pragma once 8 #pragma once
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 GdkRectangle bounds = rectangle(); 85 GdkRectangle bounds = rectangle();
86 if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) { 86 if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) {
87 // Cause a deliberate crash; 87 // Cause a deliberate crash;
88 CHECK(false); 88 CHECK(false);
89 } 89 }
90 90
91 // Need to translate so that the dirty region appears at the origin of the 91 // Need to translate so that the dirty region appears at the origin of the
92 // surface. 92 // surface.
93 T::translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); 93 T::translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y));
94 94
95 context_ = T::getTopPlatformDevice().BeginPlatformPaint(); 95 context_ = BeginPlatformPaint(GetTopDevice(*this));
96 } 96 }
97 97
98 cairo_t* context_; 98 cairo_t* context_;
99 GdkWindow* window_; 99 GdkWindow* window_;
100 GdkRegion* region_; 100 GdkRegion* region_;
101 // See description above setter. 101 // See description above setter.
102 bool composite_alpha_; 102 bool composite_alpha_;
103 103
104 // Disallow copy and assign. 104 // Disallow copy and assign.
105 CanvasPaintT(const CanvasPaintT&); 105 CanvasPaintT(const CanvasPaintT&);
106 CanvasPaintT& operator=(const CanvasPaintT&); 106 CanvasPaintT& operator=(const CanvasPaintT&);
107 }; 107 };
108 108
109 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; 109 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint;
110 110
111 } // namespace skia 111 } // namespace skia
112 112
113 #endif // SKIA_EXT_CANVAS_PAINT_LINUX_H_ 113 #endif // SKIA_EXT_CANVAS_PAINT_LINUX_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/canvas_paint_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698