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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Issue 1983863002: Inflate dirty rect by 1 pixel on a high DPI display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullcheck on page() Created 4 years, 7 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ContextTypeCount, 63 ContextTypeCount,
64 }; 64 };
65 65
66 static ContextType contextTypeFromId(const String& id); 66 static ContextType contextTypeFromId(const String& id);
67 static ContextType resolveContextTypeAliases(ContextType); 67 static ContextType resolveContextTypeAliases(ContextType);
68 68
69 HTMLCanvasElement* canvas() const { return m_canvas; } 69 HTMLCanvasElement* canvas() const { return m_canvas; }
70 70
71 virtual ContextType getContextType() const = 0; 71 virtual ContextType getContextType() const = 0;
72 virtual bool isAccelerated() const { return false; } 72 virtual bool isAccelerated() const { return false; }
73 virtual bool shouldAntialias() const { return false; }
73 virtual bool hasAlpha() const { return true; } 74 virtual bool hasAlpha() const { return true; }
74 virtual void setIsHidden(bool) = 0; 75 virtual void setIsHidden(bool) = 0;
75 virtual bool isContextLost() const { return true; } 76 virtual bool isContextLost() const { return true; }
76 virtual void setCanvasGetContextResult(RenderingContext&) { ASSERT_NOT_REACH ED(); }; 77 virtual void setCanvasGetContextResult(RenderingContext&) { ASSERT_NOT_REACH ED(); };
77 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { ASSERT_NOT_REACHED(); } 78 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { ASSERT_NOT_REACHED(); }
78 79
79 // Return true if the content is updated. 80 // Return true if the content is updated.
80 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { return fal se; } 81 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { return fal se; }
81 82
82 virtual WebLayer* platformLayer() const { return nullptr; } 83 virtual WebLayer* platformLayer() const { return nullptr; }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 private: 135 private:
135 Member<HTMLCanvasElement> m_canvas; 136 Member<HTMLCanvasElement> m_canvas;
136 Member<OffscreenCanvas> m_offscreenCanvas; 137 Member<OffscreenCanvas> m_offscreenCanvas;
137 HashSet<String> m_cleanURLs; 138 HashSet<String> m_cleanURLs;
138 HashSet<String> m_dirtyURLs; 139 HashSet<String> m_dirtyURLs;
139 }; 140 };
140 141
141 } // namespace blink 142 } // namespace blink
142 143
143 #endif 144 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698