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

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

Issue 1213003004: Fix virtual/override/final usage in Source/platform/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/FloatPolygon.h ('k') | Source/platform/graphics/BitmapImageTest.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) 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 * Copyright (C) 2008-2009 Torch Mobile, Inc. 4 * Copyright (C) 2008-2009 Torch Mobile, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static PassRefPtr<BitmapImage> create(const SkBitmap&, ImageObserver* = 0); 51 static PassRefPtr<BitmapImage> create(const SkBitmap&, ImageObserver* = 0);
52 52
53 static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0) 53 static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0)
54 { 54 {
55 return adoptRef(new BitmapImage(observer)); 55 return adoptRef(new BitmapImage(observer));
56 } 56 }
57 57
58 // This allows constructing a BitmapImage with a forced non-default orientat ion. 58 // This allows constructing a BitmapImage with a forced non-default orientat ion.
59 static PassRefPtr<BitmapImage> createWithOrientationForTesting(const SkBitma p&, ImageOrientation); 59 static PassRefPtr<BitmapImage> createWithOrientationForTesting(const SkBitma p&, ImageOrientation);
60 60
61 virtual ~BitmapImage(); 61 ~BitmapImage() override;
62 62
63 bool isBitmapImage() const override; 63 bool isBitmapImage() const override;
64 bool isLazyDecodedBitmap() override; 64 bool isLazyDecodedBitmap() override;
65 bool isImmutableBitmap() override; 65 bool isImmutableBitmap() override;
66 66
67 bool currentFrameHasSingleSecurityOrigin() const override; 67 bool currentFrameHasSingleSecurityOrigin() const override;
68 68
69 IntSize size() const override; 69 IntSize size() const override;
70 IntSize sizeRespectingOrientation() const; 70 IntSize sizeRespectingOrientation() const;
71 bool getHotSpot(IntPoint&) const override; 71 bool getHotSpot(IntPoint&) const override;
72 String filenameExtension() const override; 72 String filenameExtension() const override;
73 bool dataChanged(bool allDataReceived) override; 73 bool dataChanged(bool allDataReceived) override;
74 74
75 bool isAllDataReceived() const { return m_allDataReceived; } 75 bool isAllDataReceived() const { return m_allDataReceived; }
76 bool hasColorProfile() const; 76 bool hasColorProfile() const;
77 77
78 // It may look unusual that there's no start animation call as public API. 78 // It may look unusual that there's no start animation call as public API.
79 // This because we start and stop animating lazily. Animation starts when 79 // This because we start and stop animating lazily. Animation starts when
80 // the image is rendered, and automatically pauses once all observers no 80 // the image is rendered, and automatically pauses once all observers no
81 // longer want to render the image. 81 // longer want to render the image.
82 void stopAnimation() override; 82 void stopAnimation() override;
83 void resetAnimation() override; 83 void resetAnimation() override;
84 bool maybeAnimated() override; 84 bool maybeAnimated() override;
85 85
86 virtual void setAnimationPolicy(ImageAnimationPolicy policy) override { m_an imationPolicy = policy; } 86 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP olicy = policy; }
87 virtual ImageAnimationPolicy animationPolicy() override { return m_animation Policy; } 87 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; }
88 virtual void advanceTime(double deltaTimeInSeconds) override; 88 void advanceTime(double deltaTimeInSeconds) override;
89 89
90 bool bitmapForCurrentFrame(SkBitmap*) override; 90 bool bitmapForCurrentFrame(SkBitmap*) override;
91 PassRefPtr<Image> imageForDefaultFrame() override; 91 PassRefPtr<Image> imageForDefaultFrame() override;
92 bool currentFrameKnownToBeOpaque() override; 92 bool currentFrameKnownToBeOpaque() override;
93 ImageOrientation currentFrameOrientation(); 93 ImageOrientation currentFrameOrientation();
94 94
95 #if ENABLE(ASSERT) 95 #if ENABLE(ASSERT)
96 bool notSolidColor() override; 96 bool notSolidColor() override;
97 #endif 97 #endif
98 98
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 205 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
206 mutable bool m_hasUniformFrameSize : 1; 206 mutable bool m_hasUniformFrameSize : 1;
207 mutable bool m_haveFrameCount : 1; 207 mutable bool m_haveFrameCount : 1;
208 }; 208 };
209 209
210 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 210 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
211 211
212 } // namespace blink 212 } // namespace blink
213 213
214 #endif 214 #endif
OLDNEW
« no previous file with comments | « Source/platform/geometry/FloatPolygon.h ('k') | Source/platform/graphics/BitmapImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698