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

Side by Side Diff: ui/gfx/canvas.h

Issue 2575533002: SkClipOp is an enum class now (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « ui/compositor/clip_recorder.cc ('k') | ui/gfx/canvas.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_GFX_CANVAS_H_ 5 #ifndef UI_GFX_CANVAS_H_
6 #define UI_GFX_CANVAS_H_ 6 #define UI_GFX_CANVAS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // |layer_bounds| are the bounds of the layer relative to the current 189 // |layer_bounds| are the bounds of the layer relative to the current
190 // transform. 190 // transform.
191 void SaveLayerAlpha(uint8_t alpha); 191 void SaveLayerAlpha(uint8_t alpha);
192 void SaveLayerAlpha(uint8_t alpha, const Rect& layer_bounds); 192 void SaveLayerAlpha(uint8_t alpha, const Rect& layer_bounds);
193 193
194 // Restores the drawing state after a call to Save*(). It is an error to 194 // Restores the drawing state after a call to Save*(). It is an error to
195 // call Restore() more times than Save*(). 195 // call Restore() more times than Save*().
196 void Restore(); 196 void Restore();
197 197
198 // Applies |rect| to the current clip using the specified region |op|. 198 // Applies |rect| to the current clip using the specified region |op|.
199 void ClipRect(const Rect& rect, SkClipOp op = kIntersect_SkClipOp); 199 void ClipRect(const Rect& rect, SkClipOp op = SkClipOp::kIntersect);
200 void ClipRect(const RectF& rect, SkClipOp op = kIntersect_SkClipOp); 200 void ClipRect(const RectF& rect, SkClipOp op = SkClipOp::kIntersect);
201 201
202 // Adds |path| to the current clip. |do_anti_alias| is true if the clip 202 // Adds |path| to the current clip. |do_anti_alias| is true if the clip
203 // should be antialiased. 203 // should be antialiased.
204 void ClipPath(const SkPath& path, bool do_anti_alias); 204 void ClipPath(const SkPath& path, bool do_anti_alias);
205 205
206 // Returns true if the current clip is empty. 206 // Returns true if the current clip is empty.
207 bool IsClipEmpty() const; 207 bool IsClipEmpty() const;
208 208
209 // Returns the bounds of the current clip (in local coordinates) in the 209 // Returns the bounds of the current clip (in local coordinates) in the
210 // |bounds| parameter, and returns true if it is non empty. 210 // |bounds| parameter, and returns true if it is non empty.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // but canvas_owner_ will be null. 511 // but canvas_owner_ will be null.
512 std::unique_ptr<SkCanvas> canvas_owner_; 512 std::unique_ptr<SkCanvas> canvas_owner_;
513 SkCanvas* canvas_; 513 SkCanvas* canvas_;
514 514
515 DISALLOW_COPY_AND_ASSIGN(Canvas); 515 DISALLOW_COPY_AND_ASSIGN(Canvas);
516 }; 516 };
517 517
518 } // namespace gfx 518 } // namespace gfx
519 519
520 #endif // UI_GFX_CANVAS_H_ 520 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « ui/compositor/clip_recorder.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698