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: Source/platform/graphics/ImageBuffer.h

Issue 907453003: Move overdraw tracking code from GraphicsContext to CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test copypasta Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Called at the end of a task that rendered a whole frame 108 // Called at the end of a task that rendered a whole frame
109 void finalizeFrame(const FloatRect &dirtyRect); 109 void finalizeFrame(const FloatRect &dirtyRect);
110 void didFinalizeFrame(); 110 void didFinalizeFrame();
111 111
112 bool isDirty(); 112 bool isDirty();
113 113
114 const SkBitmap& bitmap() const; 114 const SkBitmap& bitmap() const;
115 115
116 void willAccessPixels() { m_surface->willAccessPixels(); } 116 void willAccessPixels() { m_surface->willAccessPixels(); }
117 void willOverwriteCanvas() { m_surface->willOverwriteCanvas(); }
117 118
118 PassRefPtr<Image> copyImage(BackingStoreCopy = CopyBackingStore, ScaleBehavi or = Scaled) const; 119 PassRefPtr<Image> copyImage(BackingStoreCopy = CopyBackingStore, ScaleBehavi or = Scaled) const;
119 // Give hints on the faster copyImage Mode, return DontCopyBackingStore if i t supports the DontCopyBackingStore behavior 120 // Give hints on the faster copyImage Mode, return DontCopyBackingStore if i t supports the DontCopyBackingStore behavior
120 // or return CopyBackingStore if it doesn't. 121 // or return CopyBackingStore if it doesn't.
121 static BackingStoreCopy fastCopyImageMode(); 122 static BackingStoreCopy fastCopyImageMode();
122 123
123 bool getImageData(Multiply, const IntRect&, WTF::ArrayBufferContents&) const ; 124 bool getImageData(Multiply, const IntRect&, WTF::ArrayBufferContents&) const ;
124 125
125 void putByteArray(Multiply, const unsigned char* source, const IntSize& sour ceSize, const IntRect& sourceRect, const IntPoint& destPoint); 126 void putByteArray(Multiply, const unsigned char* source, const IntSize& sour ceSize, const IntRect& sourceRect, const IntPoint& destPoint);
126 127
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 unsigned char* pixels() const { return m_data; } 168 unsigned char* pixels() const { return m_data; }
168 int height() const { return m_size.height(); } 169 int height() const { return m_size.height(); }
169 int width() const { return m_size.width(); } 170 int width() const { return m_size.width(); }
170 unsigned char* m_data; 171 unsigned char* m_data;
171 IntSize m_size; 172 IntSize m_size;
172 }; 173 };
173 174
174 } // namespace blink 175 } // namespace blink
175 176
176 #endif // ImageBuffer_h 177 #endif // ImageBuffer_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContextTest.cpp ('k') | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698