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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 2889653002: Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: movecullrect2 rebase-once-and-for-all Created 3 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 IntSize size = ExpandedIntSize(layer->Size()); 371 IntSize size = ExpandedIntSize(layer->Size());
372 372
373 IntRect interest_rect(IntPoint(0, 0), size); 373 IntRect interest_rect(IntPoint(0, 0), size);
374 suppress_layer_paint_events_ = true; 374 suppress_layer_paint_events_ = true;
375 layer->Paint(&interest_rect); 375 layer->Paint(&interest_rect);
376 suppress_layer_paint_events_ = false; 376 suppress_layer_paint_events_ = false;
377 377
378 GraphicsContext context(layer->GetPaintController()); 378 GraphicsContext context(layer->GetPaintController());
379 context.BeginRecording(interest_rect); 379 context.BeginRecording(interest_rect);
380 layer->GetPaintController().GetPaintArtifact().Replay(interest_rect, context); 380 layer->GetPaintController().GetPaintArtifact().Replay(interest_rect, context);
381 RefPtr<PictureSnapshot> snapshot = 381 RefPtr<PictureSnapshot> snapshot = AdoptRef(
382 AdoptRef(new PictureSnapshot(ToSkPicture(context.EndRecording()))); 382 new PictureSnapshot(ToSkPicture(context.EndRecording(), interest_rect)));
383 383
384 *snapshot_id = String::Number(++last_snapshot_id_); 384 *snapshot_id = String::Number(++last_snapshot_id_);
385 bool new_entry = snapshot_by_id_.insert(*snapshot_id, snapshot).is_new_entry; 385 bool new_entry = snapshot_by_id_.insert(*snapshot_id, snapshot).is_new_entry;
386 DCHECK(new_entry); 386 DCHECK(new_entry);
387 return Response::OK(); 387 return Response::OK();
388 } 388 }
389 389
390 Response InspectorLayerTreeAgent::loadSnapshot( 390 Response InspectorLayerTreeAgent::loadSnapshot(
391 std::unique_ptr<Array<protocol::LayerTree::PictureTile>> tiles, 391 std::unique_ptr<Array<protocol::LayerTree::PictureTile>> tiles,
392 String* snapshot_id) { 392 String* snapshot_id) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 506 }
507 507
508 void InspectorLayerTreeAgent::DidRemovePageOverlay(const GraphicsLayer* layer) { 508 void InspectorLayerTreeAgent::DidRemovePageOverlay(const GraphicsLayer* layer) {
509 size_t index = page_overlay_layer_ids_.Find(layer->PlatformLayer()->Id()); 509 size_t index = page_overlay_layer_ids_.Find(layer->PlatformLayer()->Id());
510 if (index == WTF::kNotFound) 510 if (index == WTF::kNotFound)
511 return; 511 return;
512 page_overlay_layer_ids_.erase(index); 512 page_overlay_layer_ids_.erase(index);
513 } 513 }
514 514
515 } // namespace blink 515 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698