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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2345403003: Add background attachment fixed main thread scrolling reason [spv2] (Closed)
Patch Set: Update test that was written for PaintArtifactCompositor's reasons update Created 4 years, 3 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/picture_layer.h" 9 #include "cc/layers/picture_layer.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return it->value; 365 return it->value;
366 366
367 int parentId = compositorIdForScrollNode(scrollNode->parent()); 367 int parentId = compositorIdForScrollNode(scrollNode->parent());
368 int id = scrollTree().Insert(cc::ScrollNode(), parentId); 368 int id = scrollTree().Insert(cc::ScrollNode(), parentId);
369 369
370 cc::ScrollNode& compositorNode = *scrollTree().Node(id); 370 cc::ScrollNode& compositorNode = *scrollTree().Node(id);
371 compositorNode.owner_id = parentId; 371 compositorNode.owner_id = parentId;
372 372
373 compositorNode.scrollable = true; 373 compositorNode.scrollable = true;
374 374
375 // TODO(pdr): Set main thread scrolling reasons.
376 compositorNode.scroll_clip_layer_bounds.SetSize(scrollNode->clip().width(), scrollNode->clip().height()); 375 compositorNode.scroll_clip_layer_bounds.SetSize(scrollNode->clip().width(), scrollNode->clip().height());
377 compositorNode.bounds.SetSize(scrollNode->bounds().width(), scrollNode->boun ds().height()); 376 compositorNode.bounds.SetSize(scrollNode->bounds().width(), scrollNode->boun ds().height());
378 compositorNode.user_scrollable_horizontal = scrollNode->userScrollableHorizo ntal(); 377 compositorNode.user_scrollable_horizontal = scrollNode->userScrollableHorizo ntal();
379 compositorNode.user_scrollable_vertical = scrollNode->userScrollableVertical (); 378 compositorNode.user_scrollable_vertical = scrollNode->userScrollableVertical ();
380 compositorNode.transform_id = compositorIdForTransformNode(scrollNode->scrol lOffsetTranslation()); 379 compositorNode.transform_id = compositorIdForTransformNode(scrollNode->scrol lOffsetTranslation());
380 compositorNode.main_thread_scrolling_reasons = scrollNode->mainThreadScrolli ngReasons();
381 381
382 auto result = m_scrollNodeMap.set(scrollNode, id); 382 auto result = m_scrollNodeMap.set(scrollNode, id);
383 DCHECK(result.isNewEntry); 383 DCHECK(result.isNewEntry);
384 scrollTree().set_needs_update(true); 384 scrollTree().set_needs_update(true);
385 385
386 return id; 386 return id;
387 } 387 }
388 388
389 void PropertyTreeManager::updateScrollOffset(int layerId, int scrollId) 389 void PropertyTreeManager::updateScrollOffset(int layerId, int scrollId)
390 { 390 {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (m_extraDataForTestingEnabled) 547 if (m_extraDataForTestingEnabled)
548 m_extraDataForTesting->contentLayers.append(layer); 548 m_extraDataForTesting->contentLayers.append(layer);
549 } 549 }
550 550
551 // Mark the property trees as having been rebuilt. 551 // Mark the property trees as having been rebuilt.
552 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 552 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
553 layerTree->property_trees()->needs_rebuild = false; 553 layerTree->property_trees()->needs_rebuild = false;
554 } 554 }
555 555
556 } // namespace blink 556 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698