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

Side by Side Diff: content/browser/renderer_host/accelerated_surface_container_linux_gl.cc

Issue 8764001: Plumb damage rect to browser compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/renderer_host/accelerated_surface_container_linux.h" 5 #include "content/browser/renderer_host/accelerated_surface_container_linux.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/browser/renderer_host/image_transport_client.h" 8 #include "content/browser/renderer_host/image_transport_client.h"
9 #include "ui/gfx/compositor/compositor_gl.h" 9 #include "ui/gfx/compositor/compositor_gl.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 21 matching lines...) Expand all
32 return false; 32 return false;
33 33
34 texture_id_ = image_transport_client_->Initialize(surface_id); 34 texture_id_ = image_transport_client_->Initialize(surface_id);
35 if (!texture_id_) { 35 if (!texture_id_) {
36 image_transport_client_.reset(); 36 image_transport_client_.reset();
37 return false; 37 return false;
38 } 38 }
39 return true; 39 return true;
40 } 40 }
41 41
42 virtual const gfx::Size& GetSize() {
43 return ui::TextureGL::size();
44 }
45
42 // TextureGL implementation 46 // TextureGL implementation
43 virtual void SetCanvas(const SkCanvas& canvas, 47 virtual void SetCanvas(const SkCanvas& canvas,
44 const gfx::Point& origin, 48 const gfx::Point& origin,
45 const gfx::Size& overall_size) OVERRIDE { 49 const gfx::Size& overall_size) OVERRIDE {
46 NOTREACHED(); 50 NOTREACHED();
47 } 51 }
48 52
49 virtual void Draw(const ui::TextureDrawParams& params, 53 virtual void Draw(const ui::TextureDrawParams& params,
50 const gfx::Rect& clip_bounds_in_texture) OVERRIDE { 54 const gfx::Rect& clip_bounds_in_texture) OVERRIDE {
51 image_transport_client_->Acquire(); 55 image_transport_client_->Acquire();
(...skipping 21 matching lines...) Expand all
73 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerLinuxGL); 77 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerLinuxGL);
74 }; 78 };
75 79
76 } // namespace 80 } // namespace
77 81
78 // static 82 // static
79 AcceleratedSurfaceContainerLinux* 83 AcceleratedSurfaceContainerLinux*
80 AcceleratedSurfaceContainerLinux::Create(const gfx::Size& size) { 84 AcceleratedSurfaceContainerLinux::Create(const gfx::Size& size) {
81 return new AcceleratedSurfaceContainerLinuxGL(size); 85 return new AcceleratedSurfaceContainerLinuxGL(size);
82 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698