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

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

Issue 2588103002: Simplify Image::isTextureBacked() (Closed)
Patch Set: rebase Created 3 years, 11 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // for applicable image types, be told to pre-cache metadata for 77 // for applicable image types, be told to pre-cache metadata for
78 // the current frame. Since this may initiate a deferred image 78 // the current frame. Since this may initiate a deferred image
79 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent 79 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent
80 // during call. 80 // during call.
81 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata }; 81 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata };
82 virtual bool currentFrameKnownToBeOpaque( 82 virtual bool currentFrameKnownToBeOpaque(
83 MetadataMode = UseCurrentMetadata) = 0; 83 MetadataMode = UseCurrentMetadata) = 0;
84 84
85 virtual bool currentFrameIsComplete() { return false; } 85 virtual bool currentFrameIsComplete() { return false; }
86 virtual bool currentFrameIsLazyDecoded() { return false; } 86 virtual bool currentFrameIsLazyDecoded() { return false; }
87 virtual bool isTextureBacked(); 87 virtual bool isTextureBacked() const { return false; }
88 88
89 // Derived classes should override this if they can assure that the current 89 // Derived classes should override this if they can assure that the current
90 // image frame contains only resources from its own security origin. 90 // image frame contains only resources from its own security origin.
91 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } 91 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; }
92 92
93 static Image* nullImage(); 93 static Image* nullImage();
94 bool isNull() const { return size().isEmpty(); } 94 bool isNull() const { return size().isEmpty(); }
95 95
96 virtual bool usesContainerSize() const { return false; } 96 virtual bool usesContainerSize() const { return false; }
97 virtual bool hasRelativeSize() const { return false; } 97 virtual bool hasRelativeSize() const { return false; }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 bool m_imageObserverDisabled; 223 bool m_imageObserverDisabled;
224 }; 224 };
225 225
226 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 226 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
227 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \ 227 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), \
228 image.is##typeName()) 228 image.is##typeName())
229 229
230 } // namespace blink 230 } // namespace blink
231 231
232 #endif 232 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698