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

Side by Side Diff: ui/wm/core/image_grid.cc

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more compile fixes Created 6 years, 4 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 | « ui/wm/core/image_grid.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/wm/core/image_grid.h" 5 #include "ui/wm/core/image_grid.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 layer->SchedulePaint(layer->bounds()); 265 layer->SchedulePaint(layer->bounds());
266 } 266 }
267 } 267 }
268 268
269 void ImageGrid::ImagePainter::OnPaintLayer(gfx::Canvas* canvas) { 269 void ImageGrid::ImagePainter::OnPaintLayer(gfx::Canvas* canvas) {
270 if (!clip_rect_.IsEmpty()) 270 if (!clip_rect_.IsEmpty())
271 canvas->ClipRect(clip_rect_); 271 canvas->ClipRect(clip_rect_);
272 canvas->DrawImageInt(image_, 0, 0); 272 canvas->DrawImageInt(image_, 0, 0);
273 } 273 }
274 274
275 void ImageGrid::ImagePainter::OnDelegatedFrameDamage(
276 const gfx::Rect& damage_rect_in_dip) {
277 }
278
275 void ImageGrid::ImagePainter::OnDeviceScaleFactorChanged( 279 void ImageGrid::ImagePainter::OnDeviceScaleFactorChanged(
276 float device_scale_factor) { 280 float device_scale_factor) {
277 // Redrawing will take care of scale factor change. 281 // Redrawing will take care of scale factor change.
278 } 282 }
279 283
280 base::Closure ImageGrid::ImagePainter::PrepareForLayerBoundsChange() { 284 base::Closure ImageGrid::ImagePainter::PrepareForLayerBoundsChange() {
281 return base::Closure(); 285 return base::Closure();
282 } 286 }
283 287
284 void ImageGrid::SetImage(const gfx::Image* image, 288 void ImageGrid::SetImage(const gfx::Image* image,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height())); 333 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height()));
330 334
331 painter_ptr->reset(new ImagePainter(image_skia)); 335 painter_ptr->reset(new ImagePainter(image_skia));
332 layer_ptr->get()->set_delegate(painter_ptr->get()); 336 layer_ptr->get()->set_delegate(painter_ptr->get());
333 layer_ptr->get()->SetFillsBoundsOpaquely(false); 337 layer_ptr->get()->SetFillsBoundsOpaquely(false);
334 layer_ptr->get()->SetVisible(true); 338 layer_ptr->get()->SetVisible(true);
335 layer_->Add(layer_ptr->get()); 339 layer_->Add(layer_ptr->get());
336 } 340 }
337 341
338 } // namespace wm 342 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/core/image_grid.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698