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

Side by Side Diff: cc/resources/bitmap_content_layer_updater.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 | « cc/layers/tiled_layer.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('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/resources/bitmap_content_layer_updater.h" 5 #include "cc/resources/bitmap_content_layer_updater.h"
6 6
7 #include "cc/debug/devtools_instrumentation.h" 7 #include "cc/debug/devtools_instrumentation.h"
8 #include "cc/debug/rendering_stats_instrumentation.h" 8 #include "cc/debug/rendering_stats_instrumentation.h"
9 #include "cc/resources/layer_painter.h" 9 #include "cc/resources/layer_painter.h"
10 #include "cc/resources/prioritized_resource.h" 10 #include "cc/resources/prioritized_resource.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 PaintContents(canvas_.get(), 78 PaintContents(canvas_.get(),
79 content_rect, 79 content_rect,
80 contents_width_scale, 80 contents_width_scale,
81 contents_height_scale, 81 contents_height_scale,
82 resulting_opaque_rect); 82 resulting_opaque_rect);
83 base::TimeDelta duration = 83 base::TimeDelta duration =
84 rendering_stats_instrumentation_->EndRecording(start_time); 84 rendering_stats_instrumentation_->EndRecording(start_time);
85 rendering_stats_instrumentation_->AddPaint( 85 rendering_stats_instrumentation_->AddPaint(
86 duration, 86 duration,
87 content_rect.width() * content_rect.height()); 87 content_rect.width() * content_rect.height());
88 //*resulting_opaque_rect = content_rect;
88 } 89 }
89 90
90 void BitmapContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue, 91 void BitmapContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue,
91 PrioritizedResource* texture, 92 PrioritizedResource* texture,
92 const gfx::Rect& source_rect, 93 const gfx::Rect& source_rect,
93 const gfx::Vector2d& dest_offset, 94 const gfx::Vector2d& dest_offset,
94 bool partial_update) { 95 bool partial_update) {
95 CHECK(canvas_); 96 CHECK(canvas_);
96 ResourceUpdate upload = ResourceUpdate::Create(texture, 97 ResourceUpdate upload = ResourceUpdate::Create(texture,
97 &bitmap_backing_, 98 &bitmap_backing_,
(...skipping 14 matching lines...) Expand all
112 void BitmapContentLayerUpdater::SetOpaque(bool opaque) { 113 void BitmapContentLayerUpdater::SetOpaque(bool opaque) {
113 if (opaque != layer_is_opaque_) { 114 if (opaque != layer_is_opaque_) {
114 canvas_.clear(); 115 canvas_.clear();
115 canvas_size_ = gfx::Size(); 116 canvas_size_ = gfx::Size();
116 } 117 }
117 118
118 ContentLayerUpdater::SetOpaque(opaque); 119 ContentLayerUpdater::SetOpaque(opaque);
119 } 120 }
120 121
121 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698