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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 years, 10 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
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/io_surface_layer_impl.h" 5 #include "cc/layers/io_surface_layer_impl.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "cc/layers/quad_sink.h" 8 #include "cc/layers/quad_sink.h"
9 #include "cc/output/gl_renderer.h" // For the GLC() macro. 9 #include "cc/output/gl_renderer.h" // For the GLC() macro.
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 void IOSurfaceLayerImpl::ReleaseResources() { 126 void IOSurfaceLayerImpl::ReleaseResources() {
127 // We don't have a valid texture ID in the new context; however, 127 // We don't have a valid texture ID in the new context; however,
128 // the IOSurface is still valid. 128 // the IOSurface is still valid.
129 DestroyTexture(); 129 DestroyTexture();
130 io_surface_changed_ = true; 130 io_surface_changed_ = true;
131 } 131 }
132 132
133 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id, 133 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id,
134 gfx::Size size) { 134 const gfx::Size& size) {
135 if (io_surface_id_ != io_surface_id) 135 if (io_surface_id_ != io_surface_id)
136 io_surface_changed_ = true; 136 io_surface_changed_ = true;
137 137
138 io_surface_id_ = io_surface_id; 138 io_surface_id_ = io_surface_id;
139 io_surface_size_ = size; 139 io_surface_size_ = size;
140 } 140 }
141 141
142 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 142 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
143 return "cc::IOSurfaceLayerImpl"; 143 return "cc::IOSurfaceLayerImpl";
144 } 144 }
145 145
146 } // namespace cc 146 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698