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

Side by Side Diff: ui/compositor/layer.h

Issue 464643003: Stop painting when receiving delegated frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest DCHECK OOPS 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
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 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 const SkRegion& damaged_region() const { return damaged_region_; } 311 const SkRegion& damaged_region() const { return damaged_region_; }
312 312
313 void CompleteAllAnimations(); 313 void CompleteAllAnimations();
314 314
315 // Suppresses painting the content by disconnecting |delegate_|. 315 // Suppresses painting the content by disconnecting |delegate_|.
316 void SuppressPaint(); 316 void SuppressPaint();
317 317
318 // Notifies the layer that the device scale factor has changed. 318 // Notifies the layer that the device scale factor has changed.
319 void OnDeviceScaleFactorChanged(float device_scale_factor); 319 void OnDeviceScaleFactorChanged(float device_scale_factor);
320 320
321 // Notifies the layer that one of its children has received a new
322 // delegated frame.
323 void OnDelegatedFrameDamage(const gfx::Rect &damage_rect_in_dip);
324
321 // Requets a copy of the layer's output as a texture or bitmap. 325 // Requets a copy of the layer's output as a texture or bitmap.
322 void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request); 326 void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request);
323 327
324 // ContentLayerClient 328 // ContentLayerClient
325 virtual void PaintContents( 329 virtual void PaintContents(
326 SkCanvas* canvas, 330 SkCanvas* canvas,
327 const gfx::Rect& clip, 331 const gfx::Rect& clip,
328 gfx::RectF* opaque, 332 gfx::RectF* opaque,
329 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE; 333 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE;
330 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} 334 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {}
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 512 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
509 // or SetTextureMailbox was called. 513 // or SetTextureMailbox was called.
510 gfx::Size frame_size_in_dip_; 514 gfx::Size frame_size_in_dip_;
511 515
512 DISALLOW_COPY_AND_ASSIGN(Layer); 516 DISALLOW_COPY_AND_ASSIGN(Layer);
513 }; 517 };
514 518
515 } // namespace ui 519 } // namespace ui
516 520
517 #endif // UI_COMPOSITOR_LAYER_H_ 521 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698