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

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

Issue 372303002: remove code from (dead) SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 * 7 *
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace WebCore { 43 namespace WebCore {
44 44
45 class ImageFrameGenerator; 45 class ImageFrameGenerator;
46 class ScaledImageFragment; 46 class ScaledImageFragment;
47 47
48 class LazyDecodingPixelRef FINAL : public LazyPixelRef { 48 class LazyDecodingPixelRef FINAL : public LazyPixelRef {
49 public: 49 public:
50 LazyDecodingPixelRef(const SkImageInfo&, PassRefPtr<ImageFrameGenerator>, si ze_t index); 50 LazyDecodingPixelRef(const SkImageInfo&, PassRefPtr<ImageFrameGenerator>, si ze_t index);
51 virtual ~LazyDecodingPixelRef(); 51 virtual ~LazyDecodingPixelRef();
52 52
53 #ifdef SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE
54 SK_DECLARE_UNFLATTENABLE_OBJECT()
55 #endif
56
57 PassRefPtr<ImageFrameGenerator> frameGenerator() const { return m_frameGener ator; } 53 PassRefPtr<ImageFrameGenerator> frameGenerator() const { return m_frameGener ator; }
58 size_t frameIndex() const { return m_frameIndex; } 54 size_t frameIndex() const { return m_frameIndex; }
59 55
60 // Returns true if the image might already be decoded in the cache. 56 // Returns true if the image might already be decoded in the cache.
61 // Optimistic version of PrepareToDecode; requires less locking. 57 // Optimistic version of PrepareToDecode; requires less locking.
62 virtual bool MaybeDecoded() OVERRIDE; 58 virtual bool MaybeDecoded() OVERRIDE;
63 virtual bool PrepareToDecode(const LazyPixelRef::PrepareParams&) OVERRIDE; 59 virtual bool PrepareToDecode(const LazyPixelRef::PrepareParams&) OVERRIDE;
64 virtual void Decode() OVERRIDE; 60 virtual void Decode() OVERRIDE;
65 61
66 protected: 62 protected:
67 // SkPixelRef implementation. 63 // SkPixelRef implementation.
68 virtual bool onNewLockPixels(LockRec*) OVERRIDE; 64 virtual bool onNewLockPixels(LockRec*) OVERRIDE;
69 virtual void onUnlockPixels() OVERRIDE; 65 virtual void onUnlockPixels() OVERRIDE;
70 virtual bool onLockPixelsAreWritable() const OVERRIDE; 66 virtual bool onLockPixelsAreWritable() const OVERRIDE;
71 67
72 virtual SkData* onRefEncodedData() OVERRIDE; 68 virtual SkData* onRefEncodedData() OVERRIDE;
73 69
74 private: 70 private:
75 RefPtr<ImageFrameGenerator> m_frameGenerator; 71 RefPtr<ImageFrameGenerator> m_frameGenerator;
76 size_t m_frameIndex; 72 size_t m_frameIndex;
77 73
78 const ScaledImageFragment* m_lockedImageResource; 74 const ScaledImageFragment* m_lockedImageResource;
79 PlatformInstrumentation::LazyPixelRefTracker m_objectTracker; 75 PlatformInstrumentation::LazyPixelRefTracker m_objectTracker;
80 }; 76 };
81 77
82 } // namespace WebCore 78 } // namespace WebCore
83 79
84 #endif // LazyDecodingPixelRef_h_ 80 #endif // LazyDecodingPixelRef_h_
OLDNEW
« no previous file with comments | « Source/platform/graphics/DiscardablePixelRef.h ('k') | Source/platform/graphics/test/MockDiscardablePixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698