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

Side by Side Diff: cc/layers/scrollbar_layer.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix builds 2 Created 7 years, 9 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
« no previous file with comments | « cc/base/worker_pool.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/layers/scrollbar_layer.h" 5 #include "cc/layers/scrollbar_layer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/layers/scrollbar_layer_impl.h" 9 #include "cc/layers/scrollbar_layer_impl.h"
10 #include "cc/resources/caching_bitmap_content_layer_updater.h" 10 #include "cc/resources/caching_bitmap_content_layer_updater.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 gfx::Rect painted_opaque_rect; 331 gfx::Rect painted_opaque_rect;
332 painter->PrepareToUpdate(rect, 332 painter->PrepareToUpdate(rect,
333 rect.size(), 333 rect.size(),
334 contents_scale_x(), 334 contents_scale_x(),
335 contents_scale_y(), 335 contents_scale_y(),
336 &painted_opaque_rect, 336 &painted_opaque_rect,
337 stats); 337 stats);
338 if (!painter->pixels_did_change() && 338 if (!painter->pixels_did_change() &&
339 resource->texture()->have_backing_texture()) { 339 resource->texture()->have_backing_texture()) {
340 TRACE_EVENT_INSTANT0("cc", 340 TRACE_EVENT_INSTANT0("cc",
341 "ScrollbarLayer::UpdatePart no texture upload needed"); 341 "ScrollbarLayer::UpdatePart no texture upload needed",
342 TRACE_EVENT_SCOPE_THREAD);
342 return; 343 return;
343 } 344 }
344 345
345 bool partial_updates_allowed = 346 bool partial_updates_allowed =
346 layer_tree_host()->settings().max_partial_texture_updates > 0; 347 layer_tree_host()->settings().max_partial_texture_updates > 0;
347 if (!partial_updates_allowed) 348 if (!partial_updates_allowed)
348 resource->texture()->ReturnBackingTexture(); 349 resource->texture()->ReturnBackingTexture();
349 350
350 gfx::Vector2d dest_offset(0, 0); 351 gfx::Vector2d dest_offset(0, 0);
351 resource->Update(queue, rect, dest_offset, partial_updates_allowed, stats); 352 resource->Update(queue, rect, dest_offset, partial_updates_allowed, stats);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 thumb_.get(), 433 thumb_.get(),
433 origin_thumb_rect, 434 origin_thumb_rect,
434 queue, 435 queue,
435 stats); 436 stats);
436 } 437 }
437 438
438 dirty_rect_ = gfx::RectF(); 439 dirty_rect_ = gfx::RectF();
439 } 440 }
440 441
441 } // namespace cc 442 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/worker_pool.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698