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

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

Issue 2859313003: Blink class layout optimization to reduce memory usage (Closed)
Patch Set: Resolved merge conflict and changed blink::ResourceStatus enum to be based on uint8_t Created 3 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
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 virtual void DrawPattern(GraphicsContext&, 203 virtual void DrawPattern(GraphicsContext&,
204 const FloatRect&, 204 const FloatRect&,
205 const FloatSize&, 205 const FloatSize&,
206 const FloatPoint& phase, 206 const FloatPoint& phase,
207 SkBlendMode, 207 SkBlendMode,
208 const FloatRect&, 208 const FloatRect&,
209 const FloatSize& repeat_spacing = FloatSize()); 209 const FloatSize& repeat_spacing = FloatSize());
210 210
211 private: 211 private:
212 bool image_observer_disabled_;
212 RefPtr<SharedBuffer> encoded_image_data_; 213 RefPtr<SharedBuffer> encoded_image_data_;
213 // TODO(Oilpan): consider having Image on the Oilpan heap and 214 // TODO(Oilpan): consider having Image on the Oilpan heap and
214 // turn this into a Member<>. 215 // turn this into a Member<>.
215 // 216 //
216 // The observer (an ImageResourceContent) is an untraced member, with the 217 // The observer (an ImageResourceContent) is an untraced member, with the
217 // ImageResourceContent being responsible for clearing itself out. 218 // ImageResourceContent being responsible for clearing itself out.
218 UntracedMember<ImageObserver> image_observer_; 219 UntracedMember<ImageObserver> image_observer_;
219 bool image_observer_disabled_;
220 }; 220 };
221 221
222 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 222 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
223 DEFINE_TYPE_CASTS(typeName, Image, image, image->Is##typeName(), \ 223 DEFINE_TYPE_CASTS(typeName, Image, image, image->Is##typeName(), \
224 image.Is##typeName()) 224 image.Is##typeName())
225 225
226 } // namespace blink 226 } // namespace blink
227 227
228 #endif 228 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698