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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2441853002: Plumb preferred raster bounds rather than scale (Closed)
Patch Set: none Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 7fe49b034efb7cb49ab24f0cac61828e7ef8ba14..d7de3109f0da010c95da2a85d3d993dd1d57901f 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -110,8 +110,7 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
m_contentsLayerId(0),
m_scrollableArea(nullptr),
m_renderingContext3d(0),
- m_preferredRasterScale(1.0f),
- m_hasPreferredRasterScale(false) {
+ m_hasPreferredRasterBounds(false) {
#if ENABLE(ASSERT)
if (m_client)
m_client->verifyNotPainting();
@@ -151,16 +150,16 @@ void GraphicsLayer::setHasWillChangeTransformHint(bool hasWillChangeTransform) {
m_layer->layer()->setHasWillChangeTransformHint(hasWillChangeTransform);
}
-void GraphicsLayer::setPreferredRasterScale(float preferredRasterScale) {
- m_preferredRasterScale = preferredRasterScale;
- m_hasPreferredRasterScale = true;
- m_layer->layer()->setPreferredRasterScale(preferredRasterScale);
+void GraphicsLayer::setPreferredRasterBounds(const IntSize& bounds) {
+ m_preferredRasterBounds = bounds;
+ m_hasPreferredRasterBounds = true;
+ m_layer->layer()->setPreferredRasterBounds(bounds);
}
-void GraphicsLayer::clearPreferredRasterScale() {
- m_preferredRasterScale = 1.0f;
- m_hasPreferredRasterScale = false;
- m_layer->layer()->clearPreferredRasterScale();
+void GraphicsLayer::clearPreferredRasterBounds() {
+ m_preferredRasterBounds = IntSize();
+ m_hasPreferredRasterBounds = false;
+ m_layer->layer()->clearPreferredRasterBounds();
}
void GraphicsLayer::setParent(GraphicsLayer* layer) {
@@ -687,8 +686,10 @@ std::unique_ptr<JSONObject> GraphicsLayer::layerAsJSONInternal(
json->setString("backfaceVisibility",
m_backfaceVisibility ? "visible" : "hidden");
- if (m_hasPreferredRasterScale)
- json->setDouble("preferredRasterScale", m_preferredRasterScale);
+ if (m_hasPreferredRasterBounds) {
+ json->setArray("preferredRasterBounds",
+ sizeAsJSONArray(m_preferredRasterBounds));
+ }
if (flags & LayerTreeIncludesDebugInfo)
json->setString("client", pointerAsString(m_client));
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | third_party/WebKit/public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698