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

Side by Side Diff: Source/platform/geometry/Region.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/platform/geometry/Region.h ('k') | Source/platform/geometry/RegionTest.cpp » ('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) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #include "platform/geometry/Region.h" 27 #include "platform/geometry/Region.h"
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 30
31 // A region class based on the paper "Scanline Coherent Shape Algebra" 31 // A region class based on the paper "Scanline Coherent Shape Algebra"
32 // by Jonathan E. Steinhart from the book "Graphics Gems II". 32 // by Jonathan E. Steinhart from the book "Graphics Gems II".
33 // 33 //
34 // This implementation uses two vectors instead of linked list, and 34 // This implementation uses two vectors instead of linked list, and
35 // also compresses regions when possible. 35 // also compresses regions when possible.
36 36
37 namespace WebCore { 37 namespace blink {
38 38
39 Region::Region() 39 Region::Region()
40 { 40 {
41 } 41 }
42 42
43 Region::Region(const IntRect& rect) 43 Region::Region(const IntRect& rect)
44 : m_bounds(rect) 44 : m_bounds(rect)
45 , m_shape(rect) 45 , m_shape(rect)
46 { 46 {
47 } 47 }
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 m_shape.swap(subtractedShape); 621 m_shape.swap(subtractedShape);
622 m_bounds = m_shape.bounds(); 622 m_bounds = m_shape.bounds();
623 } 623 }
624 624
625 void Region::translate(const IntSize& offset) 625 void Region::translate(const IntSize& offset)
626 { 626 {
627 m_bounds.move(offset); 627 m_bounds.move(offset);
628 m_shape.translate(offset); 628 m_shape.translate(offset);
629 } 629 }
630 630
631 } // namespace WebCore 631 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/geometry/Region.h ('k') | Source/platform/geometry/RegionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698