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

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

Issue 283053002: Add compositing, layers to app_list_demo Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master -- probably slightly broken Created 6 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 | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | cc/resources/bitmap_content_layer_updater.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // texture updater to be deleted. However, we can't free the memory backing 476 // texture updater to be deleted. However, we can't free the memory backing
477 // the SkCanvas until the paint finishes, so we grab a local reference here to 477 // the SkCanvas until the paint finishes, so we grab a local reference here to
478 // hold the updater alive until the paint completes. 478 // hold the updater alive until the paint completes.
479 scoped_refptr<LayerUpdater> protector(Updater()); 479 scoped_refptr<LayerUpdater> protector(Updater());
480 gfx::Rect painted_opaque_rect; 480 gfx::Rect painted_opaque_rect;
481 Updater()->PrepareToUpdate(paint_rect, 481 Updater()->PrepareToUpdate(paint_rect,
482 tiler_->tile_size(), 482 tiler_->tile_size(),
483 1.f / width_scale, 483 1.f / width_scale,
484 1.f / height_scale, 484 1.f / height_scale,
485 &painted_opaque_rect); 485 &painted_opaque_rect);
486 DLOG(INFO) << painted_opaque_rect.ToString();
486 487
487 for (int j = top; j <= bottom; ++j) { 488 for (int j = top; j <= bottom; ++j) {
488 for (int i = left; i <= right; ++i) { 489 for (int i = left; i <= right; ++i) {
489 UpdatableTile* tile = TileAt(i, j); 490 UpdatableTile* tile = TileAt(i, j);
490 DCHECK(tile); // Did SetTexturePriorites get skipped? 491 DCHECK(tile); // Did SetTexturePriorites get skipped?
491 // TODO(enne): This should not ever be null. 492 // TODO(enne): This should not ever be null.
492 if (!tile) 493 if (!tile)
493 continue; 494 continue;
494 495
495 gfx::Rect tile_rect = tiler_->tile_bounds(i, j); 496 gfx::Rect tile_rect = tiler_->tile_bounds(i, j);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 gfx::Rect prepaint_rect = visible_content_rect(); 893 gfx::Rect prepaint_rect = visible_content_rect();
893 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 894 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
894 -tiler_->tile_size().height() * kPrepaintRows); 895 -tiler_->tile_size().height() * kPrepaintRows);
895 gfx::Rect content_rect(content_bounds()); 896 gfx::Rect content_rect(content_bounds());
896 prepaint_rect.Intersect(content_rect); 897 prepaint_rect.Intersect(content_rect);
897 898
898 return prepaint_rect; 899 return prepaint_rect;
899 } 900 }
900 901
901 } // namespace cc 902 } // namespace cc
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | cc/resources/bitmap_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698