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

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

Issue 2026803002: Avoid GPU readback in tex(Sub)Image2D(ImageBitmap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should work Created 4 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
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool isAllDataReceived() const { return m_allDataReceived; } 70 bool isAllDataReceived() const { return m_allDataReceived; }
71 bool hasColorProfile() const; 71 bool hasColorProfile() const;
72 72
73 void resetAnimation() override; 73 void resetAnimation() override;
74 bool maybeAnimated() override; 74 bool maybeAnimated() override;
75 75
76 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP olicy = policy; } 76 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP olicy = policy; }
77 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; } 77 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; }
78 void advanceTime(double deltaTimeInSeconds) override; 78 void advanceTime(double deltaTimeInSeconds) override;
79 79
80 PassRefPtr<SkImage> imageForCurrentFrame() override; 80 PassRefPtr<SkImage> imageForCurrentFrame(WebGraphicsContext3DProvider* = nul lptr) override;
81 PassRefPtr<Image> imageForDefaultFrame() override; 81 PassRefPtr<Image> imageForDefaultFrame() override;
82 82
83 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override ; 83 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override ;
84 bool currentFrameIsComplete() override; 84 bool currentFrameIsComplete() override;
85 bool currentFrameIsLazyDecoded() override; 85 bool currentFrameIsLazyDecoded() override;
86 86
87 ImageOrientation currentFrameOrientation(); 87 ImageOrientation currentFrameOrientation();
88 88
89 // Construct a BitmapImage with the given orientation. 89 // Construct a BitmapImage with the given orientation.
90 static PassRefPtr<BitmapImage> createWithOrientationForTesting(const SkBitma p&, ImageOrientation); 90 static PassRefPtr<BitmapImage> createWithOrientationForTesting(const SkBitma p&, ImageOrientation);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable has the final overall image size yet. 174 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable has the final overall image size yet.
175 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 175 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
176 mutable bool m_haveFrameCount : 1; 176 mutable bool m_haveFrameCount : 1;
177 }; 177 };
178 178
179 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 179 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
180 180
181 } // namespace blink 181 } // namespace blink
182 182
183 #endif 183 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698