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

Side by Side Diff: Source/platform/graphics/Image.h

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/Path.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) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; } 111 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; }
112 112
113 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; 113 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
114 114
115 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return nu llptr; } 115 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return nu llptr; }
116 116
117 virtual void drawPattern(GraphicsContext*, const FloatRect&, 117 virtual void drawPattern(GraphicsContext*, const FloatRect&,
118 const FloatSize&, const FloatPoint& phase, CompositeOperator, 118 const FloatSize&, const FloatPoint& phase, CompositeOperator,
119 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const IntSize& repeatSpacing = IntSize()); 119 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const IntSize& repeatSpacing = IntSize());
120 120
121 #if !ASSERT_DISABLED 121 #if ASSERT_ENABLED
122 virtual bool notSolidColor() { return true; } 122 virtual bool notSolidColor() { return true; }
123 #endif 123 #endif
124 124
125 protected: 125 protected:
126 Image(ImageObserver* = 0); 126 Image(ImageObserver* = 0);
127 127
128 static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, c onst Color&, CompositeOperator); 128 static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, c onst Color&, CompositeOperator);
129 static FloatRect adjustForNegativeSize(const FloatRect&); // A helper method for translating negative width and height values. 129 static FloatRect adjustForNegativeSize(const FloatRect&); // A helper method for translating negative width and height values.
130 130
131 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec t& srcRect, CompositeOperator, blink::WebBlendMode) = 0; 131 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec t& srcRect, CompositeOperator, blink::WebBlendMode) = 0;
(...skipping 10 matching lines...) Expand all
142 RefPtr<SharedBuffer> m_encodedImageData; 142 RefPtr<SharedBuffer> m_encodedImageData;
143 ImageObserver* m_imageObserver; 143 ImageObserver* m_imageObserver;
144 }; 144 };
145 145
146 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 146 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
147 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName()) 147 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName())
148 148
149 } 149 }
150 150
151 #endif 151 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/Path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698