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

Side by Side Diff: Source/core/html/canvas/CanvasPattern.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 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 19 matching lines...) Expand all
30 #include "platform/graphics/Pattern.h" 30 #include "platform/graphics/Pattern.h"
31 #include "wtf/Forward.h" 31 #include "wtf/Forward.h"
32 #include "wtf/PassRefPtr.h" 32 #include "wtf/PassRefPtr.h"
33 #include "wtf/RefCounted.h" 33 #include "wtf/RefCounted.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class ExceptionState; 37 class ExceptionState;
38 class Image; 38 class Image;
39 39
40 class CanvasPattern : public RefCounted<CanvasPattern>, public ScriptWrappable { 40 class CanvasPattern FINAL : public RefCountedWillBeGarbageCollectedFinalized<Can vasPattern>, public ScriptWrappable {
41 public: 41 public:
42 static void parseRepetitionType(const String&, bool& repeatX, bool& repeatY, ExceptionState&); 42 static void parseRepetitionType(const String&, bool& repeatX, bool& repeatY, ExceptionState&);
43 43
44 static PassRefPtr<CanvasPattern> create(PassRefPtr<Image> image, bool repeat X, bool repeatY, bool originClean) 44 static PassRefPtrWillBeRawPtr<CanvasPattern> create(PassRefPtr<Image> image, bool repeatX, bool repeatY, bool originClean)
45 { 45 {
46 return adoptRef(new CanvasPattern(image, repeatX, repeatY, originClean)) ; 46 return adoptRefWillBeNoop(new CanvasPattern(image, repeatX, repeatY, ori ginClean));
47 } 47 }
48 48
49 Pattern* pattern() const { return m_pattern.get(); } 49 Pattern* pattern() const { return m_pattern.get(); }
50 50
51 bool originClean() const { return m_originClean; } 51 bool originClean() const { return m_originClean; }
52 52
53 void trace(Visitor*) { }
54
53 private: 55 private:
54 CanvasPattern(PassRefPtr<Image>, bool repeatX, bool repeatY, bool originClea n); 56 CanvasPattern(PassRefPtr<Image>, bool repeatX, bool repeatY, bool originClea n);
55 57
56 RefPtr<Pattern> m_pattern; 58 RefPtr<Pattern> m_pattern;
57 bool m_originClean; 59 bool m_originClean;
58 }; 60 };
59 61
60 } // namespace blink 62 } // namespace blink
61 63
62 #endif 64 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698