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

Side by Side Diff: skia/ext/canvas_paint_win.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/canvas_paint_mac.h ('k') | skia/ext/platform_canvas.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 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 SKIA_EXT_CANVAS_PAINT_WIN_H_ 5 #ifndef SKIA_EXT_CANVAS_PAINT_WIN_H_
6 #define SKIA_EXT_CANVAS_PAINT_WIN_H_ 6 #define SKIA_EXT_CANVAS_PAINT_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "skia/ext/platform_canvas.h" 9 #include "skia/ext/platform_canvas.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ps_.rcPaint.right = x + w; 55 ps_.rcPaint.right = x + w;
56 ps_.rcPaint.top = y; 56 ps_.rcPaint.top = y;
57 ps_.rcPaint.bottom = y + h; 57 ps_.rcPaint.bottom = y + h;
58 init(opaque); 58 init(opaque);
59 } 59 }
60 60
61 virtual ~CanvasPaintT() { 61 virtual ~CanvasPaintT() {
62 if (!isEmpty()) { 62 if (!isEmpty()) {
63 restoreToCount(1); 63 restoreToCount(1);
64 // Commit the drawing to the screen 64 // Commit the drawing to the screen
65 getTopPlatformDevice().drawToHDC(paint_dc_, 65 skia::DrawToNativeContext(this, paint_dc_, ps_.rcPaint.left,
66 ps_.rcPaint.left, ps_.rcPaint.top, 66 ps_.rcPaint.top, NULL);
67 NULL);
68 } 67 }
69 if (for_paint_) 68 if (for_paint_)
70 EndPaint(hwnd_, &ps_); 69 EndPaint(hwnd_, &ps_);
71 } 70 }
72 71
73 // Returns true if the invalid region is empty. The caller should call this 72 // Returns true if the invalid region is empty. The caller should call this
74 // function to determine if anything needs painting. 73 // function to determine if anything needs painting.
75 bool isEmpty() const { 74 bool isEmpty() const {
76 return ps_.rcPaint.right - ps_.rcPaint.left == 0 || 75 return ps_.rcPaint.right - ps_.rcPaint.left == 0 ||
77 ps_.rcPaint.bottom - ps_.rcPaint.top == 0; 76 ps_.rcPaint.bottom - ps_.rcPaint.top == 0;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Disallow copy and assign. 123 // Disallow copy and assign.
125 CanvasPaintT(const CanvasPaintT&); 124 CanvasPaintT(const CanvasPaintT&);
126 CanvasPaintT& operator=(const CanvasPaintT&); 125 CanvasPaintT& operator=(const CanvasPaintT&);
127 }; 126 };
128 127
129 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; 128 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint;
130 129
131 } // namespace skia 130 } // namespace skia
132 131
133 #endif // SKIA_EXT_CANVAS_PAINT_WIN_H_ 132 #endif // SKIA_EXT_CANVAS_PAINT_WIN_H_
OLDNEW
« no previous file with comments | « skia/ext/canvas_paint_mac.h ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698